/* Custom FAQ Module front-end styles. All selectors are scoped under .custom-faq-module
   so this cannot leak into or be overridden by the rest of the site's CSS. */

.custom-faq-module {
  --cfm-navy: #1f2a44;
  --cfm-text: #262b3a;
  --cfm-muted: #6b7280;
  --cfm-border: #e2e4e8;
  --cfm-border-strong: #d3d5db;
  --cfm-surface: #fdfcfa;
  --cfm-cream: #f8f5ee;
  --cfm-focus: #2563eb;
}

@supports (color: oklch(0.5 0.1 250)) {
  .custom-faq-module {
    --cfm-navy: oklch(0.24 0.048 258);
    --cfm-text: oklch(0.24 0.02 258);
    --cfm-muted: oklch(0.47 0.017 258);
    --cfm-border: oklch(0.9 0.008 250);
    --cfm-border-strong: oklch(0.86 0.012 250);
    --cfm-surface: oklch(0.995 0.005 90);
    --cfm-cream: oklch(0.975 0.011 86);
  }
}

.custom-faq-module,
.custom-faq-module *,
.custom-faq-module *::before,
.custom-faq-module *::after {
  box-sizing: border-box;
}

.custom-faq-module {
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--cfm-text);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2.5rem 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: break-word;
  overflow-wrap: break-word;
}

.custom-faq-module .cfm-header {
  margin-bottom: 2rem;
}

.custom-faq-module .cfm-search-heading {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--cfm-navy);
  margin: 0 0 16px;
  line-height: 1.2;
}

.custom-faq-module .cfm-search-wrap {
  position: relative;
  margin: 0 0 0.75rem;
}

.custom-faq-module .cfm-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cfm-muted);
  pointer-events: none;
}

.custom-faq-module .cfm-search-input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border-radius: 1rem;
  border: 2px solid var(--cfm-border-strong);
  background: var(--cfm-surface);
  color: var(--cfm-text);
  appearance: none;
}

.custom-faq-module .cfm-search-input::-webkit-search-cancel-button {
  appearance: none;
}

.custom-faq-module .cfm-search-input:focus-visible {
  outline: 3px solid var(--cfm-focus);
  outline-offset: 1px;
  border-color: var(--cfm-focus);
}

.custom-faq-module .cfm-result-count {
  font-size: 0.9375rem;
  color: var(--cfm-muted);
  margin: 0 0 1.5rem;
}

.custom-faq-module .cfm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.custom-faq-module .cfm-filter-btn {
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--cfm-border-strong);
  background: var(--cfm-surface);
  color: var(--cfm-text);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.custom-faq-module .cfm-filter-btn:hover {
  border-color: var(--cfm-navy);
}

.custom-faq-module .cfm-filter-btn.is-active {
  background: var(--cfm-navy);
  border-color: var(--cfm-navy);
  color: var(--cfm-cream);
}

.custom-faq-module .cfm-filter-btn:focus-visible {
  outline: 3px solid var(--cfm-focus);
  outline-offset: 2px;
}

.custom-faq-module .cfm-group {
  margin-bottom: 2rem;
}

.custom-faq-module .cfm-group.cfm-group-hidden {
  display: none;
}

.custom-faq-module .cfm-group-title {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--cfm-navy);
  margin: 48px 0 16px;
  white-space: normal;
  word-break: break-word;
}

.custom-faq-module .cfm-accordion {
  border-top: 1px solid var(--cfm-border);
}

.custom-faq-module .cfm-item {
  border-bottom: 1px solid var(--cfm-border);
}

.custom-faq-module .cfm-item.cfm-item-hidden {
  display: none;
}

.custom-faq-module .cfm-item-heading {
  margin: 0;
}

.custom-faq-module .cfm-item-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--cfm-navy);
  text-align: left;
  background: none;
  border: none;
  margin: 0;
  padding: 1.1rem 0.25rem;
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
}

.custom-faq-module .cfm-item-trigger:hover {
  text-decoration: none;
}

.custom-faq-module .cfm-item-trigger:focus-visible {
  outline: 3px solid var(--cfm-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.custom-faq-module .cfm-item-icon {
  flex-shrink: 0;
  color: var(--cfm-muted);
  transition: transform 0.2s ease;
}

.custom-faq-module .cfm-item-trigger[aria-expanded="true"] .cfm-item-icon {
  transform: rotate(180deg);
}

.custom-faq-module .cfm-item-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.custom-faq-module .cfm-item-panel-inner {
  padding: 0 0.25rem 1.25rem;
  font-size: 1rem;
  color: var(--cfm-text);
  white-space: normal;
  word-break: break-word;
}

.custom-faq-module .cfm-item-panel-inner > p:first-child {
  margin-top: 0;
}

.custom-faq-module .cfm-item-panel-inner > *:last-child {
  margin-bottom: 0;
}

.custom-faq-module .cfm-item-panel-inner a {
  color: var(--cfm-navy);
  text-decoration: underline;
}

.custom-faq-module .cfm-item-panel-inner ul,
.custom-faq-module .cfm-item-panel-inner ol {
  padding-left: 1.25rem;
}

.custom-faq-module .cfm-empty-state,
.custom-faq-module .cfm-no-results {
  font-size: 1rem;
  color: var(--cfm-muted);
  padding: 1.5rem 0;
}

.custom-faq-module .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1024px) {
  .custom-faq-module .cfm-group-title {
    font-size: 24px;
  }

  .custom-faq-module .cfm-item-trigger {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .custom-faq-module {
    padding: 1.75rem 0;
  }

  .custom-faq-module .cfm-item-trigger {
    padding: 0.9rem 0.25rem;
  }

  .custom-faq-module .cfm-filters {
    gap: 0.4rem;
  }

  .custom-faq-module .cfm-filter-btn {
    font-size: 0.875rem;
    padding: 0.45rem 0.85rem;
  }
}
