/* =============================================
   overlays.css — Legal & FAQ overlay panels
   ============================================= */

/* ── Backdrop ── */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Panel ── */
.overlay-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9100;
  transform: translate(-50%, -48%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity   0.32s cubic-bezier(0.4, 0, 0.2, 1);

  width: min(820px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;

  background: linear-gradient(
    160deg,
    rgba(14, 10, 28, 0.98) 0%,
    rgba(8, 6, 20, 0.99) 100%
  );
  border: 1px solid rgba(191, 90, 242, 0.18);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 40px 80px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(191, 90, 242, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.overlay-panel.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ── Top accent line ── */
.overlay-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(191, 90, 242, 0.7) 30%,
    rgba(201, 162, 39, 0.6) 70%,
    transparent
  );
}

/* ── Header ── */
.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  position: relative;
}

.overlay-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.overlay-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(191, 90, 242, 0.15), rgba(201, 162, 39, 0.08));
  border: 1px solid rgba(191, 90, 242, 0.25);
  color: #BF5AF2;
  flex-shrink: 0;
}

.overlay-label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #C9A227;
  margin-bottom: 4px;
}

.overlay-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* ── Close button ── */
.overlay-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 200, 220, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.overlay-close:hover {
  background: rgba(191, 90, 242, 0.12);
  border-color: rgba(191, 90, 242, 0.4);
  color: #fff;
  box-shadow: 0 0 14px rgba(191, 90, 242, 0.2);
  transform: rotate(90deg);
}

/* ── Meta bar (last updated, etc.) ── */
.overlay-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 36px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.overlay-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: rgba(160, 160, 192, 0.45);
  font-family: 'JetBrains Mono', monospace;
}

.overlay-meta-item svg {
  color: rgba(191, 90, 242, 0.5);
  flex-shrink: 0;
}

/* ── Scrollable body ── */
.overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 36px 36px 48px;
  scroll-behavior: smooth;
}

/* Scrollbar inside overlay */
.overlay-body::-webkit-scrollbar { width: 4px; }
.overlay-body::-webkit-scrollbar-track { background: transparent; }
.overlay-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(191,90,242,0.5), rgba(201,162,39,0.4));
  border-radius: 2px;
}

/* ── Typography inside overlay ── */
.overlay-body h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 700;
  color: #ffffff;
  margin: 2.2rem 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(191, 90, 242, 0.15);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.overlay-body h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: linear-gradient(180deg, #BF5AF2, #C9A227);
  border-radius: 2px;
  flex-shrink: 0;
}

.overlay-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(220, 200, 255, 0.9);
  margin: 1.6rem 0 0.6rem;
  letter-spacing: 0.02em;
}

.overlay-body p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: rgba(180, 180, 210, 0.72);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.overlay-body ul,
.overlay-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.overlay-body ul li,
.overlay-body ol li {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: rgba(180, 180, 210, 0.68);
  line-height: 1.8;
  margin-bottom: 0.45rem;
}

.overlay-body ul li::marker {
  color: #BF5AF2;
}

.overlay-body ol li::marker {
  color: #C9A227;
  font-weight: 700;
}

.overlay-body strong {
  color: rgba(220, 210, 255, 0.92);
  font-weight: 600;
}

.overlay-body a {
  color: #BF5AF2;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.overlay-body a:hover {
  color: #C9A227;
}

/* ── Intro block ── */
.overlay-intro {
  padding: 18px 22px;
  border-radius: 12px;
  background: rgba(191, 90, 242, 0.06);
  border: 1px solid rgba(191, 90, 242, 0.14);
  margin-bottom: 2rem;
}

.overlay-intro p {
  font-size: 0.88rem;
  color: rgba(200, 190, 230, 0.75);
  line-height: 1.75;
  margin: 0;
}

/* ── FAQ accordion ── */
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.25s;
}

.faq-item.is-open {
  border-color: rgba(191, 90, 242, 0.3);
  box-shadow: 0 0 20px rgba(191, 90, 242, 0.06);
}

.faq-question {
  width: 100%;
  background: rgba(255, 255, 255, 0.025);
  border: none;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(191, 90, 242, 0.07);
}

.faq-item.is-open .faq-question {
  background: rgba(191, 90, 242, 0.08);
}

.faq-q-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(220, 215, 240, 0.9);
  line-height: 1.4;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  color: rgba(191, 90, 242, 0.6);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  color: #BF5AF2;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 20px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: rgba(170, 165, 200, 0.72);
  line-height: 1.8;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}

/* ── Footer note ── */
.overlay-footer-note {
  margin-top: 2.5rem;
  padding: 16px 20px;
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.05);
  border: 1px solid rgba(201, 162, 39, 0.15);
  font-size: 0.8rem;
  color: rgba(201, 162, 39, 0.65);
  line-height: 1.7;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .overlay-header { padding: 20px 20px 16px; }
  .overlay-meta   { padding: 10px 20px; }
  .overlay-body   { padding: 24px 20px 40px; }
  .overlay-panel  { width: 96vw; max-height: 90vh; border-radius: 16px; }
}