/* ================================================================
   Persian FAQ Plugin — faq.css
   Dark slate/cyan aesthetic, RTL, Vazirmatn font
   ================================================================ */

/* ---- Reset scoped to our container ---- */
#persian-faq-app *,
#persian-faq-app *::before,
#persian-faq-app *::after {
  box-sizing: border-box;
}

/* ---- Root container ---- */
#persian-faq-app {
  position: relative;
  width: 100%;
  min-height: 400px;
  background: #020617; /* slate-950 */
  color: #ffffff;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  direction: rtl;
  overflow: hidden;
  padding-bottom: 6rem;
}

/* ---- Radial glow backdrop ---- */
#persian-faq-app::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at top, rgba(34,211,238,0.12), transparent 55%);
}

/* ---- Inner content wrapper ---- */
#persian-faq-app > * {
  position: relative;
  z-index: 1;
}

.pfaq-inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ================================================================
   HERO
   ================================================================ */

.pfaq-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
}

.pfaq-hero-glow {
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 900;
  line-height: 1;
  color: #67e8f9; /* cyan-300 */
  text-shadow:
    0 0 6px #67e8f9,
    0 0 18px #22d3ee,
    0 0 36px #06b6d4,
    0 0 70px #0891b2,
    0 0 120px #0e7490;
  user-select: none;
  animation: pfaq-pulse 2.4s ease-in-out infinite;
}

@keyframes pfaq-pulse {
  0%, 100% { opacity: 0.75; transform: scale(0.98); }
  50%       { opacity: 1.00; transform: scale(1.02); }
}

.pfaq-hero-title {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  animation: pfaq-fade-up 0.6s ease 0.1s both;
}

.pfaq-hero-subtitle {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: clamp(0.9rem, 2.5vw, 1.125rem);
  line-height: 2;
  color: #cbd5e1; /* slate-300 */
  animation: pfaq-fade-up 0.6s ease 0.2s both;
}

@keyframes pfaq-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   SEARCH BAR
   ================================================================ */

.pfaq-search-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem;
  margin-bottom: 2.5rem;
}

.pfaq-search-inner {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
}

.pfaq-search-icon {
  pointer-events: none;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #94a3b8; /* slate-400 */
}

.pfaq-search-input {
  width: 100%;
  height: 3rem;
  padding: 0 2.75rem 0 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #ffffff;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 1rem;
  text-align: right;
  direction: rtl;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pfaq-search-input::placeholder {
  color: #64748b; /* slate-500 */
}

.pfaq-search-input:focus {
  border-color: rgba(6,182,212,0.5);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

/* Chrome: remove the "x" clear button on search inputs */
.pfaq-search-input::-webkit-search-cancel-button {
  display: none;
}

.pfaq-result-count {
  margin-top: 0.5rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.875rem;
  color: #94a3b8;
  text-align: right;
}

/* ================================================================
   CATEGORIES & ACCORDION
   ================================================================ */

.pfaq-categories {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ---- Category section ---- */
.pfaq-category {
  animation: pfaq-fade-up 0.5s ease both;
}

.pfaq-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pfaq-category-title {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 700;
  color: #67e8f9; /* cyan-300 */
  margin: 0;
}

.pfaq-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(6,182,212,0.4);
  color: #a5f3fc; /* cyan-200 */
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ---- Accordion list ---- */
.pfaq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ---- Accordion item ---- */
.pfaq-item {
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.pfaq-item:hover {
  border-color: rgba(6,182,212,0.3);
  background: rgba(255,255,255,0.07);
}

/* ---- Trigger button ---- */
.pfaq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  direction: rtl;
  color: #ffffff;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1.125rem);
  font-weight: 500;
  line-height: 1.5;
  gap: 0.75rem;
}

.pfaq-trigger:focus-visible {
  outline: 2px solid rgba(6,182,212,0.6);
  outline-offset: -2px;
}

/* ---- Chevron icon ---- */
.pfaq-chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: #94a3b8;
  transition: transform 0.3s ease;
}

.pfaq-item.pfaq-open .pfaq-chevron {
  transform: rotate(180deg);
}

/* ---- Answer panel ---- */
.pfaq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.pfaq-answer-inner {
  padding: 0 1rem 1rem;
  font-size: clamp(0.85rem, 2vw, 1rem);
  line-height: 2;
  color: #cbd5e1; /* slate-300 */
  text-align: right;
  direction: rtl;
}

/* ================================================================
   NO RESULTS
   ================================================================ */

.pfaq-no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: #94a3b8;
  font-size: 1rem;
  font-family: 'Vazirmatn', system-ui, sans-serif;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 640px) {
  .pfaq-hero {
    padding: 3rem 1rem 2rem;
  }
  .pfaq-search-wrap {
    margin-bottom: 1.5rem;
  }
}
