/**
 * Ravers Co FAQ - Frontend
 * Deep-Space UV: dark glass panels, violet/pink accents, low-opacity cyan glow.
 */

.rcfaq {
	--rcfaq-bg: var(--rsdg-dark-bg, #0f0326);
	--rcfaq-panel: rgba(255, 255, 255, 0.04);
	--rcfaq-panel-2: rgba(255, 255, 255, 0.06);
	--rcfaq-border: rgba(0, 229, 255, 0.14);
	--rcfaq-border-soft: rgba(255, 255, 255, 0.08);
	--rcfaq-border-strong: rgba(124, 58, 237, 0.55);
	--rcfaq-text: #e8e2f5;
	--rcfaq-text-dim: #9d92b8;
	--rcfaq-primary: var(--rsdg-primary, #7c3aed);
	--rcfaq-pink: var(--rsdg-pink, #ec4899);
	--rcfaq-violet: #a78bfa;
	--rcfaq-cyan: var(--rsdg-secondary, #00e5ff);
	--rcfaq-radius: 14px;
	--rcfaq-shadow: 0 8px 32px rgba(124, 58, 237, 0.18);

	max-width: 1100px;
	margin: 2rem auto;
	padding: 1.75rem 1.25rem 2rem;
	background: var(--rcfaq-bg);
	border: 1px solid var(--rcfaq-border-soft);
	border-radius: var(--rcfaq-radius);
	color: var(--rcfaq-text);
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	line-height: 1.6;
}

/* Hero ----------------------------------------------------------------- */
.rcfaq__hero {
	position: relative;
	background: linear-gradient(135deg, rgba(124, 58, 237, 0.10), rgba(0, 229, 255, 0.05));
	border: 1px solid var(--rcfaq-border);
	border-radius: var(--rcfaq-radius);
	padding: 2.5rem 1.75rem 2rem;
	overflow: hidden;
	margin-bottom: 1.5rem;
	box-shadow: var(--rcfaq-shadow);
}
.rcfaq__hero-glow {
	position: absolute;
	inset: -50%;
	background:
		radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.30), transparent 40%),
		radial-gradient(circle at 80% 30%, rgba(0, 229, 255, 0.18), transparent 45%),
		radial-gradient(circle at 50% 100%, rgba(236, 72, 153, 0.24), transparent 50%);
	filter: blur(60px);
	opacity: 0.7;
	pointer-events: none;
	animation: rcfaq-glow 18s linear infinite;
	z-index: 0;
}
@keyframes rcfaq-glow {
	0%   { transform: rotate(0deg) scale(1); }
	50%  { transform: rotate(180deg) scale(1.1); }
	100% { transform: rotate(360deg) scale(1); }
}
.rcfaq__hero > * { position: relative; z-index: 1; }

.rcfaq__title {
	font-size: clamp(1.75rem, 4vw, 2.6rem);
	font-weight: 800;
	margin: 0 0 0.5rem;
	background: linear-gradient(135deg, #7c3aed, #ec4899, #06b6d4, #a78bfa, #7c3aed);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	animation: rcfaq-shine 6s linear infinite;
	letter-spacing: -0.02em;
}
@keyframes rcfaq-shine {
	to { background-position: 200% 0; }
}
.rcfaq__emoji { -webkit-text-fill-color: initial; color: initial; }
.rcfaq__subtitle {
	color: var(--rcfaq-text-dim);
	margin: 0 0 1.5rem;
	font-size: 1.05rem;
}

/* Search --------------------------------------------------------------- */
.rcfaq__search {
	position: relative;
	display: flex;
	align-items: center;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--rcfaq-border);
	border-radius: 999px;
	padding: 0.5rem 1rem;
	max-width: 600px;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.rcfaq__search:focus-within {
	border-color: var(--rcfaq-cyan);
	box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}
.rcfaq__search-icon { color: var(--rcfaq-text-dim); flex-shrink: 0; margin-right: 0.5rem; }
.rcfaq__search-input {
	flex: 1;
	background: transparent;
	border: 0;
	outline: none;
	color: var(--rcfaq-text);
	font-size: 1.05rem;
	padding: 0.5rem 0;
}
.rcfaq__search-input::placeholder { color: var(--rcfaq-text-dim); }
.rcfaq__search-clear {
	background: none;
	border: 0;
	color: var(--rcfaq-text-dim);
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0 0.25rem;
	line-height: 1;
}
.rcfaq__search-clear:hover { color: var(--rcfaq-cyan); }

/* Filter chips --------------------------------------------------------- */
.rcfaq__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1.25rem;
}
.rcfaq__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.95rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--rcfaq-border);
	border-radius: 999px;
	color: var(--rcfaq-text);
	font-size: 0.92rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}
.rcfaq__chip:hover {
	border-color: var(--rcfaq-cyan);
	background: rgba(0, 229, 255, 0.08);
	transform: translateY(-1px);
}
.rcfaq__chip.is-active {
	background: linear-gradient(135deg, var(--rcfaq-primary), var(--rcfaq-pink));
	border-color: transparent;
	color: #fff;
	box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

/* TOC ------------------------------------------------------------------ */
.rcfaq__toc {
	background: var(--rcfaq-panel);
	border: 1px solid var(--rcfaq-border);
	border-radius: 12px;
	padding: 0.75rem 1.25rem;
	margin-bottom: 1.5rem;
}
.rcfaq__toc summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--rcfaq-text);
	list-style: none;
}
.rcfaq__toc summary::-webkit-details-marker { display: none; }
.rcfaq__toc-list {
	list-style: none;
	padding: 0.75rem 0 0;
	margin: 0;
	columns: 2;
	column-gap: 1.5rem;
}
.rcfaq__toc-list li { break-inside: avoid; padding: 0.2rem 0; }
.rcfaq__toc-list a {
	color: var(--rcfaq-text-dim);
	text-decoration: none;
	font-size: 0.92rem;
}
.rcfaq__toc-list a:hover { color: var(--rcfaq-cyan); }
@media (max-width: 600px) { .rcfaq__toc-list { columns: 1; } }

/* Groups & Items ------------------------------------------------------- */
.rcfaq__group { margin-bottom: 2rem; }
.rcfaq__group-heading {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.4rem;
	font-weight: 700;
	margin: 1.25rem 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--rcfaq-border);
	color: var(--rcfaq-text);
}
.rcfaq__group-emoji { font-size: 1.5rem; }

.rcfaq__items { display: flex; flex-direction: column; gap: 0.6rem; }

.rcfaq__item {
	background: var(--rcfaq-panel);
	border: 1px solid var(--rcfaq-border);
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.rcfaq__item:hover { border-color: var(--rcfaq-cyan); }
.rcfaq__item[open] {
	border-color: var(--rcfaq-primary);
	box-shadow: 0 4px 24px rgba(124, 58, 237, 0.22);
	background: rgba(124, 58, 237, 0.06);
}
.rcfaq__item:target {
	border-color: var(--rcfaq-cyan);
	box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.35);
	animation: rcfaq-pulse 1.2s ease-out;
}
@keyframes rcfaq-pulse {
	0%   { box-shadow: 0 0 0 0   rgba(0, 229, 255, 0.6); }
	100% { box-shadow: 0 0 0 24px rgba(0, 229, 255, 0); }
}

.rcfaq__question {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1.1rem 1.25rem;
	cursor: pointer;
	font-weight: 600;
	font-size: 1.05rem;
	list-style: none;
	user-select: none;
}
.rcfaq__question::-webkit-details-marker { display: none; }
.rcfaq__q-icon {
	font-size: 1.3rem;
	flex-shrink: 0;
	width: 2rem;
	text-align: center;
}
.rcfaq__q-text { flex: 1; }
.rcfaq__q-toggle {
	color: var(--rcfaq-pink);
	flex-shrink: 0;
	transition: transform 0.25s, color 0.2s;
}
.rcfaq__item:hover .rcfaq__q-toggle { color: var(--rcfaq-cyan); }
.rcfaq__item[open] .rcfaq__q-toggle { transform: rotate(180deg); color: var(--rcfaq-primary); }

.rcfaq__answer {
	padding: 0 1.25rem 1.25rem 4.25rem;
	color: var(--rcfaq-text-dim);
	font-size: 1rem;
}
.rcfaq__answer p { margin: 0 0 0.75rem; }
.rcfaq__answer ul { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.rcfaq__answer a {
	color: var(--rcfaq-cyan);
	text-decoration: underline;
	text-decoration-color: rgba(0, 229, 255, 0.4);
	text-underline-offset: 3px;
}
.rcfaq__answer a:hover { color: var(--rcfaq-pink); }
.rcfaq__answer strong { color: var(--rcfaq-text); }

@media (max-width: 600px) {
	.rcfaq__answer { padding-left: 1.25rem; }
}

/* Helpful + share ------------------------------------------------------ */
.rcfaq__helpful {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1rem;
	padding-top: 0.85rem;
	border-top: 1px dashed var(--rcfaq-border);
	font-size: 0.9rem;
}
.rcfaq__helpful-label { color: var(--rcfaq-text-dim); margin-right: 0.25rem; }
.rcfaq__helpful-btn {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--rcfaq-border);
	border-radius: 999px;
	color: var(--rcfaq-text);
	padding: 0.35rem 0.85rem;
	cursor: pointer;
	font-size: 0.9rem;
	transition: all 0.2s;
}
.rcfaq__helpful-btn:hover { border-color: var(--rcfaq-cyan); background: rgba(0, 229, 255, 0.10); transform: translateY(-1px); }
.rcfaq__helpful-btn.is-voted { background: linear-gradient(135deg, var(--rcfaq-primary), var(--rcfaq-pink)); border-color: transparent; color: #fff; cursor: default; }
.rcfaq__helpful-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.rcfaq__helpful-thanks {
	color: var(--rcfaq-cyan);
	font-weight: 600;
	font-size: 0.9rem;
}

.rcfaq__share {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
	flex-wrap: wrap;
}
.rcfaq__share-btn,
.rcfaq__print-btn {
	background: transparent;
	border: 1px solid rgba(167, 139, 250, 0.5);
	color: var(--rcfaq-violet);
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	font-size: 0.82rem;
	cursor: pointer;
	transition: all 0.2s;
}
.rcfaq__share-btn:hover,
.rcfaq__print-btn:hover { color: var(--rcfaq-cyan); border-color: var(--rcfaq-cyan); }
.rcfaq__share-btn.is-copied { background: var(--rcfaq-cyan); color: #05121a; border-color: transparent; }

/* Empty state ---------------------------------------------------------- */
.rcfaq__empty {
	text-align: center;
	padding: 2.5rem 1rem;
	color: var(--rcfaq-text-dim);
	font-size: 1.05rem;
	border: 1px dashed var(--rcfaq-border);
	border-radius: 12px;
}

/* Contact panel -------------------------------------------------------- */
.rcfaq__contact {
	position: relative;
	overflow: hidden;
	margin-top: 2.5rem;
	padding: 2rem 1.75rem;
	background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(124, 58, 237, 0.10));
	border: 1px solid var(--rcfaq-border);
	border-radius: var(--rcfaq-radius);
	box-shadow: var(--rcfaq-shadow);
}
.rcfaq__contact-glow {
	position: absolute;
	inset: -40%;
	background:
		radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.20), transparent 50%),
		radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.24), transparent 50%);
	filter: blur(50px);
	opacity: 0.55;
	pointer-events: none;
	z-index: 0;
}
.rcfaq__contact > * { position: relative; z-index: 1; }
.rcfaq__contact h3 { font-size: 1.5rem; margin: 0 0 0.5rem; color: var(--rcfaq-text); }
.rcfaq__contact > p { color: var(--rcfaq-text-dim); margin: 0 0 1.25rem; }

.rcfaq__contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem;
}
.rcfaq__contact-card {
	display: flex;
	flex-direction: column;
	padding: 1rem 1.1rem;
	background: rgba(0, 0, 0, 0.30);
	border: 1px solid var(--rcfaq-border);
	border-radius: 12px;
	color: var(--rcfaq-text);
	text-decoration: none;
	transition: all 0.2s;
}
.rcfaq__contact-card:hover {
	border-color: var(--rcfaq-primary);
	background: rgba(124, 58, 237, 0.10);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(124, 58, 237, 0.20);
}
.rcfaq__contact-card span { font-size: 1.5rem; }
.rcfaq__contact-card strong { font-size: 1rem; margin: 0.25rem 0; color: var(--rcfaq-text); }
.rcfaq__contact-card small { color: var(--rcfaq-text-dim); font-size: 0.82rem; line-height: 1.45; }

/* Light theme override (optional) -------------------------------------- */
.rcfaq--light {
	--rcfaq-bg: #fff;
	--rcfaq-panel: #faf6ff;
	--rcfaq-border: rgba(120, 50, 200, 0.2);
	--rcfaq-border-strong: rgba(124, 58, 237, 0.4);
	--rcfaq-text: #1a0b2e;
	--rcfaq-text-dim: #5a4a72;
}

/* Print mode ----------------------------------------------------------- */
@media print {
	.rcfaq { color: #000; background: #fff; max-width: 100%; }
	.rcfaq__hero, .rcfaq__contact, .rcfaq__filters, .rcfaq__search, .rcfaq__toc,
	.rcfaq__helpful, .rcfaq__share, .rcfaq__hero-glow, .rcfaq__contact-glow { display: none !important; }
	.rcfaq__item { border: 1px solid #888; background: #fff; box-shadow: none; page-break-inside: avoid; }
	.rcfaq__item .rcfaq__answer { display: block !important; padding: 0.75rem 1rem; color: #000; }
	.rcfaq__item .rcfaq__q-toggle { display: none; }
	.rcfaq__title, .rcfaq__group-heading { color: #000 !important; -webkit-text-fill-color: #000; }
}

/* Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.rcfaq__hero-glow, .rcfaq__title { animation: none !important; }
	.rcfaq__item, .rcfaq__chip, .rcfaq__contact-card { transition: none; }
}
