/* Shared in-page tabs and segmented controls. Loaded after module styles. */
.cw-tabs,
.segmented-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #dce3eb;
  border-radius: 999px;
  background: #f4f6f9;
  box-shadow: 0 4px 14px rgba(20, 32, 51, 0.05);
  scrollbar-width: none;
}
.cw-tabs { margin-bottom: 18px !important; }
.cw-tabs::-webkit-scrollbar,
.segmented-toggle::-webkit-scrollbar { display: none; }
.cw-tabs > button,
.segmented-toggle > button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 40px;
  padding: 9px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #627086;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.cw-tabs > button:hover:not(.active):not([aria-selected="true"]),
.segmented-toggle > button:hover:not(.active):not([aria-selected="true"]) { background: #e9edf2; color: #243146; }
.cw-tabs > button.active,
.cw-tabs > button[aria-selected="true"],
.segmented-toggle > button.active,
.segmented-toggle > button[aria-selected="true"] {
  border-color: transparent;
  background: var(--brand-secondary, #4b4b4b);
  color: #fff;
  box-shadow: 0 5px 13px rgba(20, 32, 51, 0.17);
}
.cw-tabs > button:focus-visible,
.segmented-toggle > button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-primary, #f68b1f), transparent 65%);
  outline-offset: 2px;
}
.cw-tabs > button svg,
.segmented-toggle > button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.cw-tabs .tab-count-badge,
.segmented-toggle .tab-count-badge {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e1e6ed;
  color: #647084;
  font-size: 11px;
  line-height: 1.35;
}
.cw-tabs > button.active .tab-count-badge,
.cw-tabs > button[aria-selected="true"] .tab-count-badge,
.segmented-toggle > button.active .tab-count-badge,
.segmented-toggle > button[aria-selected="true"] .tab-count-badge { background: rgba(255,255,255,.18); color: #fff; }

/* Keep both meeting tab bars identical despite historical module selectors. */
.meeting-tabs.cw-tabs,
.meetings-tabs.cw-tabs {
  display: inline-flex !important;
  gap: 3px !important;
  width: max-content !important;
  padding: 4px !important;
  border: 1px solid #dce3eb !important;
  border-radius: 999px !important;
  background: #f4f6f9 !important;
  box-shadow: 0 4px 14px rgba(20, 32, 51, .05) !important;
}
.meeting-tabs.cw-tabs > button,
.meetings-tabs.cw-tabs > button {
  min-height: 40px !important;
  padding: 9px 15px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #627086 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}
.meeting-tabs.cw-tabs > button.active,
.meetings-tabs.cw-tabs > button.active {
  background: var(--brand-secondary, #4b4b4b) !important;
  color: #fff !important;
  box-shadow: 0 5px 13px rgba(20, 32, 51, .17) !important;
}

@media (max-width: 700px) {
  .cw-tabs,
  .segmented-toggle { display: flex; width: 100%; }
  .cw-tabs > button,
  .segmented-toggle > button { flex: 1 0 auto; padding-inline: 13px; }
}
