/* ═══════════════════════════════════════════════════════
   Concern Panels V2 — Premium Accordion
   Themed for AstroKamya™ cosmic indigo palette
   ═══════════════════════════════════════════════════════ */

/* Section override — ensure visible */
.concern-panels-section .cp-panels,
.concern-panels-section .cp-oracle {
  opacity: 1 !important;
  transform: none !important;
}

/* Subtitle */
.cp-subtitle {
  font-size: 15px;
  color: var(--text-3);
  max-width: 480px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* ── Panels Container ── */
.cp-panels {
  display: flex;
  height: 420px;
  gap: 4px;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 32px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Individual Panel ── */
.cp-panel {
  flex: 1;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: flex 0.65s cubic-bezier(0.4, 0, 0.15, 1);
  border: 1px solid rgba(124, 58, 237, 0.15);
}
.cp-panel.open {
  flex: 4.5;
}

/* Panel backgrounds — visible against cosmic void */
.cp-panel[data-c="l"] { background: linear-gradient(180deg, rgba(232,54,124,0.12) 0%, rgba(17,11,46,0.85) 60%, rgba(17,5,20,0.95) 100%); }
.cp-panel[data-c="c"] { background: linear-gradient(180deg, rgba(255,184,0,0.10) 0%, rgba(17,11,46,0.85) 60%, rgba(17,12,5,0.95) 100%); }
.cp-panel[data-c="w"] { background: linear-gradient(180deg, rgba(6,182,212,0.10) 0%, rgba(17,11,46,0.85) 60%, rgba(5,15,20,0.95) 100%); }
.cp-panel[data-c="m"] { background: linear-gradient(180deg, rgba(124,58,237,0.12) 0%, rgba(17,11,46,0.85) 60%, rgba(12,5,30,0.95) 100%); }

/* Hover border glow */
.cp-panel[data-c="l"]:hover,
.cp-panel[data-c="l"].open { border-color: rgba(232,54,124,0.35); }
.cp-panel[data-c="c"]:hover,
.cp-panel[data-c="c"].open { border-color: rgba(255,184,0,0.35); }
.cp-panel[data-c="w"]:hover,
.cp-panel[data-c="w"].open { border-color: rgba(6,182,212,0.35); }
.cp-panel[data-c="m"]:hover,
.cp-panel[data-c="m"].open { border-color: rgba(124,58,237,0.35); }

/* Top accent line */
.cp-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 2;
  transition: opacity 0.4s;
}
.cp-panel[data-c="l"]::before { background: var(--rose); }
.cp-panel[data-c="c"]::before { background: var(--gold); }
.cp-panel[data-c="w"]::before { background: var(--teal); }
.cp-panel[data-c="m"]::before { background: var(--violet); }
.cp-panel:not(.open)::before { opacity: 0.5; }
.cp-panel.open::before { opacity: 1; box-shadow: 0 0 12px currentColor; }

/* Inner glow effect */
.cp-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 1;
}
.cp-panel[data-c="l"]::after { background: radial-gradient(ellipse at 50% 20%, rgba(232,54,124,0.15) 0%, transparent 65%); }
.cp-panel[data-c="c"]::after { background: radial-gradient(ellipse at 50% 20%, rgba(255,184,0,0.15) 0%, transparent 65%); }
.cp-panel[data-c="w"]::after { background: radial-gradient(ellipse at 50% 20%, rgba(6,182,212,0.15) 0%, transparent 65%); }
.cp-panel[data-c="m"]::after { background: radial-gradient(ellipse at 50% 20%, rgba(124,58,237,0.15) 0%, transparent 65%); }
.cp-panel:hover::after { opacity: 0.6; }
.cp-panel.open::after { opacity: 1; }

/* Star canvas */
.cp-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Planet illustration ── */
.cp-planet-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  transition: transform 0.6s ease, opacity 0.5s ease;
  z-index: 2;
}
.cp-panel.open .cp-planet-wrap {
  transform: translate(-50%, -68%);
  opacity: 0.65;
}

/* ── Vertical label (collapsed state) ── */
.cp-vlabel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding-bottom: 24px;
  display: flex;
  justify-content: center;
  transition: opacity 0.3s 0.1s;
  z-index: 3;
}
.cp-vlabel span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
  font-family: var(--font);
  font-weight: 600;
}
.cp-panel.open .cp-vlabel {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

/* ── Expanded content ── */
.cp-expanded {
  position: absolute;
  bottom: 30px; left: 24px; right: 18px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s 0.18s, transform 0.45s 0.18s;
  z-index: 3;
}
.cp-panel.open .cp-expanded {
  opacity: 1;
  transform: translateY(0);
}

.cp-ecat {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  font-family: var(--font);
  margin-bottom: 12px;
}
.cp-ecat-rose { color: var(--rose-light); }
.cp-ecat-gold { color: var(--gold-light); }
.cp-ecat-teal { color: var(--teal-light); }
.cp-ecat-violet { color: var(--violet-light); }

.cp-eq {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.25;
  color: var(--text-1);
  margin-bottom: 10px;
}

.cp-ehint {
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.07em;
  font-family: var(--font-b);
}

/* ── Selection ring ── */
.cp-sel-ring {
  position: absolute;
  top: 18px; right: 18px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(240,234,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.35s;
  z-index: 3;
}
.cp-panel.open .cp-sel-ring {
  border-color: rgba(240,234,255,0.5);
}
.cp-sel-inner {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-1);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s 0.1s, opacity 0.3s 0.1s;
}
.cp-panel.open .cp-sel-inner {
  transform: scale(1);
  opacity: 1;
}

/* ═══ Oracle Preview Card ═══ */
.cp-oracle {
  max-width: 860px;
  margin: 0 auto 28px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--border);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s, transform 0.55s, border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(240,234,255,0.04);
}
.cp-oracle.vis {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.cp-oracle-top {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(124,58,237,0.07);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.cp-oq-icon { opacity: 0.35; }
.cp-oq-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--text-3);
}

.cp-oracle-body {
  padding: 18px 24px 24px;
}
.cp-oracle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cp-oracle-name {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-family: var(--font);
}
.cp-oracle-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  animation: cpLiveDot 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(74,222,128,0.4);
}
@keyframes cpLiveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.cp-oracle-stat {
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  font-family: var(--font-b);
}

/* Typing dots */
.cp-tdots {
  display: flex;
  gap: 5px;
  align-items: center;
}
.cp-tdots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  animation: cpTypeBounce 1.4s ease-in-out infinite;
}
.cp-tdots span:nth-child(2) { animation-delay: 0.18s; }
.cp-tdots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes cpTypeBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Answer text */
.cp-oans {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.78;
  color: var(--text-2);
  display: none;
}

/* Tags */
.cp-otags {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.cp-otag {
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: 0.05em;
  font-family: var(--font);
  font-weight: 500;
}

/* ═══ Mobile Responsive ═══ */
@media (max-width: 768px) {
  .cp-panels {
    flex-direction: column;
    height: auto;
    gap: 3px;
  }
  .cp-panel {
    flex: none !important;
    height: 72px;
    transition: height 0.55s cubic-bezier(0.4, 0, 0.15, 1);
  }
  .cp-panel.open {
    flex: none !important;
    height: 280px;
  }
  .cp-vlabel {
    top: 0; bottom: 0; left: 0; right: auto;
    padding: 0 0 0 18px;
    align-items: center;
  }
  .cp-vlabel span {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    transform: none;
  }
  .cp-planet-wrap {
    top: 50%; left: auto; right: 16px;
    transform: translate(0, -50%) scale(0.6);
  }
  .cp-panel.open .cp-planet-wrap {
    top: 30%;
    transform: translate(0, -50%) scale(0.55);
    opacity: 0.5;
  }
  .cp-expanded {
    bottom: 16px; left: 18px; right: 14px;
  }
  .cp-eq { font-size: 20px; }
  .cp-oracle-top { padding: 14px 18px; }
  .cp-oracle-body { padding: 14px 18px 18px; }
  .cp-subtitle { font-size: 13.5px; margin-bottom: 36px; }
}

@media (max-width: 480px) {
  .cp-panel { height: 64px; }
  .cp-panel.open { height: 260px; }
  .cp-eq { font-size: 18px; }
}
