/* ==========================================================================
   OFFICIAL RAWDAH PERMIT — ULTRA-PREMIUM, ELEGANT & EXCLUSIVE DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-page: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;

  /* Luxury Palette */
  --ready-green-1: #10b981;
  --ready-green-2: #059669;
  --ready-dark-btn-1: #064e3b;
  --ready-dark-btn-2: #033829;
  
  --pending-amber-1: #f59e0b;
  --pending-amber-2: #d97706;

  --time-badge-bg: #f59e0b;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-family);
  background: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  padding: 2.5rem 1.5rem;
}

/* ==========================================================================
   Ambient Mesh Lighting / Subtle Glows (Mewah & Bernuansa Madinah)
   ========================================================================== */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.glow-top-left {
  top: -120px;
  left: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
}

.glow-top-right {
  top: -100px;
  right: -100px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.09) 0%, rgba(139, 92, 246, 0) 70%);
}

.glow-bottom-center {
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 350px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0) 70%);
}

/* ==========================================================================
   Pastel Geometric Diamond Accents (Presisi Sesuai Kartu Resmi Rawdah)
   ========================================================================== */
.embed-geo-topleft {
  position: fixed;
  top: -40px;
  left: -40px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 1;
}

.embed-geo-topleft .geo-shape-1 {
  position: absolute;
  width: 140px;
  height: 140px;
  top: 10px;
  left: 10px;
  background: rgba(167, 243, 208, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08);
}

.embed-geo-topleft .geo-shape-2 {
  position: absolute;
  width: 100px;
  height: 100px;
  top: 60px;
  left: 60px;
  background: rgba(110, 231, 183, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  border-radius: 12px;
}

.embed-geo-topright {
  position: fixed;
  top: -45px;
  right: -45px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 1;
}

.embed-geo-topright .geo-shape-1 {
  position: absolute;
  width: 140px;
  height: 140px;
  top: 10px;
  right: 10px;
  background: rgba(221, 214, 254, 0.48);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08);
}

.embed-geo-topright .geo-shape-2 {
  position: absolute;
  width: 105px;
  height: 105px;
  top: 60px;
  right: 60px;
  background: rgba(196, 181, 253, 0.68);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  border-radius: 12px;
}

.embed-geo-bottomright {
  position: fixed;
  bottom: -45px;
  right: 20%;
  width: 190px;
  height: 190px;
  pointer-events: none;
  z-index: 1;
}

.embed-geo-bottomright .geo-shape-1 {
  position: absolute;
  width: 115px;
  height: 115px;
  background: rgba(167, 243, 208, 0.38);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  border-radius: 14px;
}

.embed-geo-bottomright .geo-shape-2 {
  position: absolute;
  width: 85px;
  height: 85px;
  right: -40px;
  bottom: -20px;
  background: rgba(110, 231, 183, 0.52);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  border-radius: 10px;
}

/* ==========================================================================
   Central Content Wrapper
   ========================================================================== */
.official-embed-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.embed-content-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Header Info (Date, Time, Gender)
   ========================================================================== */
.embed-header-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 3.25rem;
  text-align: center;
}

.embed-header-row,
.embed-gender-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
}

/* ==========================================================================
   Print Hint (Dibawah Gender) Sesuai Permintaan
   ========================================================================== */
.embed-print-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  max-width: 720px;
  text-align: center;
}

.hint-multilang {
  font-size: 0.98rem;
  font-weight: 500;
  color: #475569;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.hint-sep {
  margin: 0 0.35rem;
  color: #94a3b8;
}

.hint-ar {
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.5;
  direction: rtl;
}

.emerald-text {
  color: #059669;
  font-weight: 700;
}

.embed-header-svg {
  flex-shrink: 0;
  stroke: #1e293b;
  opacity: 0.9;
}

.embed-header-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.embed-header-divider {
  color: #94a3b8;
  font-weight: 400;
  margin: 0 0.15rem;
  user-select: none;
}

.embed-time-badge {
  background: var(--time-badge-bg);
  color: #000000;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.28);
}

/* ==========================================================================
   Dual Status Big Rectangles (Ready Emerald & Pending Amber)
   ========================================================================== */
.embed-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 250px);
  gap: 1.85rem;
  margin-bottom: 3.5rem;
  justify-content: center;
  width: 100%;
}

.embed-card {
  position: relative;
  border-radius: 18px;
  width: 100%;
  height: 168px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.embed-card:hover {
  transform: translateY(-3px) scale(1.01);
}

/* Kartu Ready (Luxury Emerald Green) */
.embed-card.is-ready {
  background: linear-gradient(155deg, var(--ready-green-1) 0%, var(--ready-green-2) 100%);
  box-shadow: 0 16px 36px -8px rgba(16, 185, 129, 0.38), 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.embed-card.is-ready:hover {
  box-shadow: 0 22px 42px -8px rgba(16, 185, 129, 0.46), 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* Kartu Pending (Luxury Amber Gold) */
.embed-card.is-pending {
  background: linear-gradient(155deg, var(--pending-amber-1) 0%, var(--pending-amber-2) 100%);
  box-shadow: 0 16px 36px -8px rgba(245, 158, 11, 0.35), 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.embed-card.is-pending:hover {
  box-shadow: 0 22px 42px -8px rgba(245, 158, 11, 0.44), 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* Card Body (Upper Section) */
.embed-card-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 0.85rem 0.35rem;
  width: 100%;
}

.embed-card.is-pending .embed-card-body {
  padding: 1.1rem 0.85rem;
}

/* Top-Right Badges (Lingkaran Putih Presisi Mewah) */
.embed-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.embed-card.is-ready .embed-card-badge svg {
  stroke: var(--ready-green-2);
}

.embed-card.is-pending .embed-card-badge svg {
  stroke: var(--pending-amber-2);
}

/* Center Big Number & Label */
.embed-card-num {
  font-size: 4rem;
  font-weight: 800;
  line-height: 0.95;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.embed-card-label {
  font-size: 1.18rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
  margin-top: 0.3rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Bottom Bar / Button "Unduh PDF" pada Kartu Ready */
.embed-card-pdf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.72rem 1rem;
  background: linear-gradient(180deg, var(--ready-dark-btn-1) 0%, var(--ready-dark-btn-2) 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.embed-card-pdf-btn .pdf-btn-icon {
  stroke: #ffffff;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.embed-card-pdf-btn:hover {
  background: linear-gradient(180deg, #04392b 0%, #02261c 100%);
  color: #f1f5f9;
}

.embed-card-pdf-btn:hover .pdf-btn-icon {
  transform: translateY(1px);
}

/* ==========================================================================
   2-Hour Warning Notice Box (Bilingual Sesuai Referensi Resmi)
   ========================================================================== */
.embed-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  width: 100%;
  max-width: 710px;
  margin: 0 auto;
  text-align: left;
  padding: 1.15rem 1.6rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-left: 4px solid #f59e0b;
  box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.embed-notice-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(245, 158, 11, 0.12);
}

.embed-notice-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 6px;
  background: rgba(254, 243, 199, 0.75);
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.embed-notice-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notice-row {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.notice-row.notice-en {
  font-weight: 600;
  color: #0f172a;
}

.notice-row.notice-id {
  font-weight: 500;
  color: #475569;
}

.notice-row.notice-ar {
  font-size: 1.08rem;
  font-weight: 600;
  color: #1e293b;
  direction: rtl;
  margin-top: 0.15rem;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Subtle, clean red wavy accent on crucial time phrase */
.accent-wavy {
  text-decoration: underline wavy #ef4444;
  text-underline-offset: 4.5px;
  text-decoration-thickness: 1.4px;
  font-weight: 700;
  color: #0f172a;
}

/* ==========================================================================
   Floating Action Dock (Glassmorphism Eksklusif)
   ========================================================================== */
.floating-actions {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.65rem;
  z-index: 100;
}

.floating-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.02);
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-family);
}

.floating-btn .btn-svg {
  stroke: #475569;
  transition: stroke 0.2s ease;
}

.floating-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.floating-btn:hover .btn-svg {
  stroke: #059669;
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-size: 0.92rem;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 9999;
  letter-spacing: 0.01em;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* States */
.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  text-align: center;
  width: 100%;
}

.luxury-spinner {
  width: 48px;
  height: 48px;
  border: 3.5px solid #e2e8f0;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.error-icon-box {
  margin-bottom: 1.25rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.state-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.state-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 640px) {
  body {
    padding: 2rem 1rem;
  }

  .embed-header-info {
    margin-bottom: 2.25rem;
  }

  .embed-header-row,
  .embed-gender-row {
    font-size: 1.12rem;
  }

  .embed-time-badge {
    font-size: 1.08rem;
    padding: 2px 7px;
  }

  .embed-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.95rem;
    max-width: 390px;
    margin-bottom: 2.5rem;
  }

  .embed-card {
    height: 152px;
    border-radius: 16px;
  }

  .embed-card-num {
    font-size: 3rem;
  }

  .embed-card-label {
    font-size: 1rem;
  }

  .embed-card-pdf-btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
  }

  .hint-multilang {
    font-size: 0.88rem;
  }

  .hint-ar {
    font-size: 0.98rem;
  }

  .embed-notice-box {
    padding: 1.1rem 1.25rem;
    gap: 0.95rem;
    align-items: flex-start;
  }

  .notice-line-multilang {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .notice-line-ar {
    font-size: 1.02rem;
    line-height: 1.45;
  }

  .embed-notice-icon svg {
    width: 28px;
    height: 28px;
  }

  .floating-actions {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    justify-content: center;
  }

  .floating-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.85rem;
  }
}
