/* ═══════════════════════════════════════════════════════════════════════════
   🚪✨ 119-glass-door.css — GLASS-DOOR: زر التجريبي الزجاجي + فهرس المعاينة +
   مودال شروط الاشتراك (تُحمَّل بعد 118-gold-path — آخر التتالي عمداً)
   قاعدة البيت: ممنوع نجمة-شرطة داخل التعليقات. طبقة قابلة للإزالة بحذف سطرها.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── زر «تصفح المحتوى التجريبي» — Outline زجاجي بنفسجي (ق A3):
      هيكل .poster-action-btn موروث (نفس العرض والارتفاع ونصف القطر والخط)؛
      هنا الجلد فقط: خلفية مموّهة + حد مضيء متناسق مع الهوية الكونية. */
.poster-action-btn.gd-trial-btn {
  background: rgba(168, 85, 247, 0.10);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--primary, #a855f7);
  border: 1.5px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.18) inset, 0 2px 10px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}
.poster-action-btn.gd-trial-btn:hover,
.poster-action-btn.gd-trial-btn:focus-visible {
  background: rgba(168, 85, 247, 0.18);
  border-color: var(--primary, #a855f7);
}
:root[data-theme="light"] .poster-action-btn.gd-trial-btn {
  background: rgba(147, 51, 234, 0.07);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 1px 6px rgba(124, 58, 237, 0.10);
}
/* شبكة الجوال الضيقة: البوستر 9على16 بoverflow مخفي — الزر الثانوي يتحول
   شريطاً مضغوطاً 30px (فخ §7-25، اختبار 375) */
@media (max-width: 400px) {
  .poster-action-btn.gd-trial-btn {
    padding: 5px 6px;
    min-height: 30px;
    font-size: 0.72rem;
    gap: 5px;
  }
}

/* ── فهرس المعاينة داخل عارض MV ─────────────────────────────────────────── */
.gd-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  margin: 2px 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary, #a855f7);
  background: rgba(168, 85, 247, 0.10);
  border: 1px solid rgba(168, 85, 247, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
:root[data-theme="light"] .gd-preview-badge {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.07);
  border-color: rgba(124, 58, 237, 0.4);
}

/* شريط CTA العلوي (كان بلا أي CSS — عيب موثق بالاستكشاف) */
.gc-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(99, 102, 241, 0.10));
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.gc-cta-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gc-cta-txt b { font-size: 0.92rem; color: var(--text-color, #fff); }
.gc-cta-txt span { font-size: 0.78rem; color: var(--text-muted, #9ca3af); }
.gc-cta-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: var(--primary, #a855f7);
}
:root[data-theme="light"] .gc-cta-txt b { color: #1f2937; }
:root[data-theme="light"] .gc-cta-banner { background: rgba(124, 58, 237, 0.06); }

/* شارة الدرس التجريبي داخل البطاقة */
.gc-trial-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  vertical-align: middle;
}
.gc-lesson-card.gc-locked { opacity: 0.82; }

/* CTA لاصق أسفل شيت المعاينة (A4) — يحترم إبهام الآيفون */
.gd-cta-stick {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  margin-top: 14px;
  background: linear-gradient(to top, var(--bg-color, #0b0714) 62%, transparent);
}
.gd-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary, #a855f7), #6366f1);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
}
:root[data-theme="light"] .gd-cta-stick {
  background: linear-gradient(to top, #ffffff 62%, transparent);
}

/* ── شريط الموافقة على الشروط في شيت الدفع (B4) ─────────────────────────── */
.gd-terms-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin: 10px 0;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.gd-terms-bar input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--primary, #a855f7);
  cursor: pointer;
  flex: 0 0 auto;
}
.gd-terms-bar label {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  color: var(--text-color, #e5e7eb);
}
.gd-terms-bar .gd-terms-link {
  color: var(--primary, #a855f7);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.gd-terms-bar.gd-shake { animation: gdShake 0.45s ease; }
@keyframes gdShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
}
:root[data-theme="light"] .gd-terms-bar { background: rgba(124, 58, 237, 0.05); }
:root[data-theme="light"] .gd-terms-bar label { color: #1f2937; }

/* ── مودال الشروط .gd-terms-sheet (B4) — جوال bottom-sheet، كمبيوتر حوار ── */
.gd-terms-overlay {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.gd-terms-overlay.gd-open { opacity: 1; }
.gd-terms-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: min(80vh, 720px);
  background: var(--bg-card, #171123);
  color: var(--text-color, #e5e7eb);
  border: 1px solid var(--border-color, rgba(168, 85, 247, 0.25));
  border-radius: 22px 22px 0 0;
  transform: translateY(24px);
  transition: transform 0.22s ease;
  overflow: hidden;
}
.gd-terms-overlay.gd-open .gd-terms-sheet { transform: translateY(0); }
.gd-terms-grip {
  flex: 0 0 auto;
  width: 44px;
  height: 5px;
  margin: 10px auto 2px;
  border-radius: 999px;
  background: var(--border-color, rgba(255, 255, 255, 0.18));
}
.gd-terms-head {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: inherit;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}
.gd-terms-title {
  font-size: 1.02rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gd-terms-x {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  cursor: pointer;
}
.gd-terms-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px 18px;
  line-height: 1.9;
  font-size: 0.93rem;
}
.gd-terms-body h1, .gd-terms-body h2, .gd-terms-body h3 {
  margin: 14px 0 8px;
  font-weight: 800;
  line-height: 1.5;
}
.gd-terms-body h2 { font-size: 1.05rem; color: var(--primary, #a855f7); }
.gd-terms-body p { margin: 0 0 10px; }
.gd-terms-body ul, .gd-terms-body ol { margin: 0 0 12px; padding-right: 22px; }
.gd-terms-body li { margin-bottom: 6px; }
.gd-terms-body img { max-width: 100%; border-radius: 10px; }
.gd-terms-sec-title {
  margin: 16px 0 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary, #a855f7);
  background: rgba(168, 85, 247, 0.08);
}
.gd-terms-foot {
  position: sticky;
  bottom: 0;
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: inherit;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}
.gd-terms-agree {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 16px;
  border: none;
  border-radius: 13px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary, #a855f7), #6366f1);
}
.gd-terms-close2 {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.16));
  border-radius: 13px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  background: transparent;
  color: inherit;
}
@media (min-width: 700px) {
  .gd-terms-overlay { align-items: center; padding: 24px; }
  .gd-terms-sheet { max-width: 560px; border-radius: 20px; }
  .gd-terms-grip { display: none; }
}
:root[data-theme="light"] .gd-terms-sheet {
  background: #ffffff;
  color: #1f2937;
  border-color: rgba(124, 58, 237, 0.2);
}
:root[data-theme="light"] .gd-terms-body h2,
:root[data-theme="light"] .gd-terms-sec-title { color: #7c3aed; }

/* قفل تمرير الجسم أثناء المودال */
body.gd-terms-lock { overflow: hidden !important; }

/* ── حركة أقل (U-02) ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .gd-terms-overlay, .gd-terms-sheet { transition: none; }
  .gd-terms-bar.gd-shake { animation: none; }
}
