/* ===== FAQs and Settings modals (js/modals.js) =====
   Shared by every page. Builds on .modal-overlay / .win-modal in styles.css. */

.info-modal {
  position: relative;
  max-width: 560px;
  padding: 0;
  text-align: left;
}

/* Title bar stays put while the content scrolls */
.info-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 0;
  background: var(--surface-0);
}

.info-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.info-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: -8px;
  padding: 0;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 50%;
}

.info-modal-close:active {
  transform: none;
}

@media (hover: hover) {
  .info-modal-close:hover {
    color: var(--text-primary);
    background: var(--surface-2);
    opacity: 1;
  }
}

.info-modal-body {
  padding: 8px 24px 24px;
}

/* ---- FAQs ---- */
.faq-group + .faq-group {
  margin-top: 18px;
}

.faq-group-title {
  margin: 14px 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  box-sizing: border-box;   /* so the slide (js/modals.js) animates the full height, padding included */
  padding: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.faq-answer p + p {
  margin-top: 8px;
}

.faq-answer ul {
  margin-left: 20px;
}

.faq-answer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

/* ---- Settings ---- */
.setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 0;
}

.setting-label {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.setting-desc {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Two-way toggle */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  background: var(--surface-2);
  border-radius: 10px;
}

.segmented button {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 104px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-secondary);
  background: none;
  border-radius: 8px;
}

.segmented button span {
  font-size: 11px;
  font-weight: 500;
}

.segmented button[aria-checked="true"] {
  color: var(--text-primary);
  background: var(--surface-0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.segmented button:active {
  transform: none;
}

@media (max-width: 900px) {
  .info-modal-head {
    padding: 16px 20px 12px;
  }

  .info-modal-body {
    padding: 4px 20px 20px;
  }

  .info-modal-title {
    font-size: 20px;
  }
}
