/* =============================================================================
   HALAMAN ADZAN, IQOMAH, & SHOLAT (OVERLAY SYSTEM - ISLAMIC ARCHITECTURAL THEME)
   Layar Masjid Digital Signage
   Desain berwibawa, otentik bernuansa arsitektur masjid, mudah dibaca dari jarak jauh
   ============================================================================= */

.adzan-screen {
  position: absolute;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(14px, 2vh, 26px) clamp(20px, 2.5vw, 40px);
  background:
    radial-gradient(circle at 50% 30%, rgba(27, 199, 207, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(224, 183, 53, 0.08) 0%, transparent 60%),
    linear-gradient(145deg, #031e16 0%, #08382a 45%, #021610 100%);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease, background 0.8s ease;
  overflow: hidden;
}

.adzan-screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Khusus Fase Sholat: Layar sangat redup dan hening agar khusyuk */
.adzan-screen.phase--sholat {
  background: radial-gradient(circle at 50% 45%, #03140e 0%, #010805 100%);
}

.adzan-screen.phase--sholat .adzan-inner-frame {
  opacity: 0.15;
  border-color: rgba(224, 183, 53, 0.15);
}

.adzan-screen.phase--sholat .adzan-corner {
  opacity: 0.15;
}

.adzan-screen.phase--sholat .adzan-bg-pattern,
.adzan-screen.phase--sholat .adzan-bg-glow {
  opacity: 0.08;
}

.adzan-screen.phase--sholat .adzan-header {
  opacity: 0.22;
  transition: opacity 0.6s ease;
}

/* =============================================================================
   ORNAMEN ARSITEKTUR ISLAMI & FRAME
   ============================================================================= */

/* Pola Geometri Bintang 8 Girih Tradisional (Bukan Titik-titik Dot-Matrix AI) */
.adzan-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='rgba(224,183,53,0.18)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M40 0v20l-14 14 14 14v20M120 0v20l14 14-14 14v20M0 40h20l14-14 14 14h20M160 40h-20l-14-14-14 14h-20M40 80v20l-14 14 14 14v20M120 80v20l14 14-14 14v20M0 120h20l14-14 14 14h20M160 120h-20l-14-14-14 14h-20'/%3E%3Cpath d='M80 0v20l-16 16 16 16v24l-16 16 16 16v20M0 80h20l16-16 16 16h24l16-16 16 16h20'/%3E%3Cpath d='M80 24l8 8-8 8-8-8zM80 104l8 8-8 8-8-8zM24 80c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16zM104 80c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
  background-position: center;
  opacity: 0.38;
  transition: opacity 0.6s ease;
}

.adzan-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 75vh;
  background: radial-gradient(circle, rgba(15, 90, 68, 0.4) 0%, transparent 68%);
  filter: blur(50px);
  pointer-events: none;
}

/* Bingkai Emas Ganda Dalam Layar */
.adzan-inner-frame {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(240, 201, 106, 0.28);
  border-radius: 0;
  pointer-events: none;
  z-index: 1;
}

.adzan-inner-frame::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(240, 201, 106, 0.12);
  border-radius: 0;
}

/* Ornamen Sudut Kaligrafi / Arabesque Islami Emas (Bukan L-Bracket Cyberpunk) */
.adzan-corner {
  position: absolute;
  width: clamp(72px, 6.5vw, 110px);
  height: clamp(72px, 6.5vw, 110px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.85;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23E0B735' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 44V4h40'/%3E%3Cpath d='M14 4v26h26'/%3E%3Cpath d='M4 14h26v26'/%3E%3Cpath d='M40 14H26v26'/%3E%3Cpath d='M4 4l20 20' stroke-width='1.5' opacity='0.7'/%3E%3Ccircle cx='24' cy='24' r='3' fill='%23E0B735'/%3E%3C/g%3E%3C/svg%3E");
}

.adzan-corner--top-left {
  top: 0;
  left: 0;
}

.adzan-corner--top-right {
  top: 0;
  right: 0;
  transform: scaleX(-1);
}

.adzan-corner--bottom-left {
  bottom: 0;
  left: 0;
  transform: scaleY(-1);
}

.adzan-corner--bottom-right {
  bottom: 0;
  right: 0;
  transform: scale(-1);
}

/* =============================================================================
   HEADER (Jam & Tanggal Plakat di Tengah Atas)
   ============================================================================= */
.adzan-header {
  position: absolute;
  top: clamp(14px, 1.8vh, 24px);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.adzan-clock-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: clamp(8px, 1.2vh, 14px) clamp(24px, 2.5vw, 42px);
  border-radius: 16px;
  background: rgba(6, 36, 27, 0.82);
  border: 1.5px solid rgba(240, 201, 106, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.adzan-clock-time {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: clamp(2.4rem, 3.4vw, 4.2rem);
  font-weight: 800;
  color: var(--amber-soft);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 14px rgba(240, 201, 106, 0.4);
  line-height: 1.05;
}

.adzan-clock-date {
  font-size: clamp(1rem, 1.25vw, 1.45rem);
  font-weight: 600;
  color: var(--mint-soft);
  opacity: 0.95;
  letter-spacing: 0.02em;
}

/* =============================================================================
   MAIN STAGE & PHASES
   ============================================================================= */
.adzan-stage {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(70px, 10vh, 100px) 0 clamp(16px, 2vh, 24px) 0;
  min-height: 0;
}

.adzan-phase {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 1080px;
  animation: phaseFadeIn 0.45s ease-out forwards;
}

.adzan-phase.active {
  display: flex;
}

@keyframes phaseFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Kapsul Nama Sholat Beraksen Emas */
.adzan-prayer-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: clamp(6px, 0.8vh, 12px) clamp(20px, 2.2vw, 36px);
  border-radius: 999px;
  background: rgba(240, 201, 106, 0.1);
  border: 1.5px solid rgba(240, 201, 106, 0.45);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  margin-top: clamp(6px, 0.8vh, 12px);
}

.adzan-pill-label {
  font-size: clamp(0.85rem, 1.1vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--mint-soft);
  text-transform: uppercase;
}

.adzan-pill-val {
  font-size: clamp(1.4rem, 2.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-highlight);
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(240, 201, 106, 0.4);
}

/* =============================================================================
   1. FASE MENJELANG AZAN
   ============================================================================= */
.adzan-countdown-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(12px, 1.8vh, 22px);
}

.adzan-countdown-title {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(2.8rem, 5.2vw, 5.8rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ivory-soft);
  line-height: 1.05;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 32px rgba(240, 201, 106, 0.25);
}

/* Bingkai Timer Bergaya Mihrab / Lengkungan Islami */
.adzan-timer-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vh, 38px) clamp(50px, 7vw, 110px);
  min-width: clamp(340px, 42vw, 640px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 201, 106, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(8, 48, 36, 0.85) 0%, rgba(5, 30, 22, 0.92) 100%);
  border: 2px solid rgba(224, 183, 53, 0.48);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 28px rgba(224, 183, 53, 0.2);
  margin-bottom: clamp(14px, 2vh, 26px);
  transition: all 0.3s ease;
}

.adzan-timer-digits {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: clamp(6.2rem, 11vw, 12rem);
  font-weight: 900;
  color: var(--gold-highlight);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: none;
}

.adzan-timer-accent {
  width: 70%;
  height: 2px;
  margin-top: clamp(8px, 1vh, 16px);
  background: linear-gradient(90deg, transparent, rgba(224, 183, 53, 0.85), transparent);
}

/* Mode Urgent (10 detik terakhir sebelum adzan) */
.adzan-timer-box.urgent {
  border-color: #e53935;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

.adzan-timer-box.urgent .adzan-timer-digits {
  color: #e53935;
  text-shadow: none !important;
}

.adzan-countdown-hint {
  margin: 0;
  font-size: clamp(1.3rem, 1.8vw, 2.2rem);
  font-weight: 600;
  color: var(--mint-soft);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* =============================================================================
   2. FASE SAAT AZAN (Desain Plakat Maklumat Islami Terpadu)
   ============================================================================= */
.adzan-takbir-calligraphy {
  font-family: "Amiri", "Scheherazade New", "Traditional Arabic", serif;
  font-size: clamp(4.8rem, 8vw, 9.6rem);
  font-weight: 700;
  color: var(--gold-highlight);
  line-height: 1.2;
  margin-bottom: clamp(4px, 0.8vh, 12px);
  text-shadow: 0 4px 32px rgba(224, 183, 53, 0.55);
}

.adzan-title-wrap {
  margin-bottom: clamp(14px, 2vh, 24px);
}

.adzan-heading-main {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3.2vw, 3.8rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint-soft);
  line-height: 1.1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.adzan-prayer-hero {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(3.6rem, 5.8vw, 6.8rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--amber-soft);
  text-transform: uppercase;
  line-height: 1.05;
  margin: clamp(4px, 0.6vh, 8px) 0 0;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.6), 0 0 38px rgba(240, 201, 106, 0.45);
}

/* Plakat Maklumat Adab & Ketenangan Ringkas */
.adzan-adab-plaque {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: auto;
  max-width: min(96%, 1100px);
  border-radius: 999px;
  background:
    radial-gradient(circle at top center, rgba(240, 201, 106, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(7, 44, 33, 0.9) 0%, rgba(4, 28, 20, 0.94) 100%);
  border: 1.5px solid rgba(224, 183, 53, 0.38);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 24px rgba(224, 183, 53, 0.12);
  padding: clamp(14px, 1.8vh, 22px) clamp(28px, 3vw, 50px);
  gap: clamp(24px, 3vw, 44px);
  margin-top: clamp(6px, 1vh, 14px);
}

.adzan-adab-item {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 18px);
}

.adzan-adab-icon-wrap {
  width: clamp(32px, 2.8vw, 44px);
  height: clamp(32px, 2.8vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-highlight);
  flex-shrink: 0;
}

.adzan-adab-icon-wrap--silent {
  color: #ff9999;
}

.adzan-adab-icon-wrap svg {
  width: 100%;
  height: 100%;
}

.adzan-adab-text {
  font-size: clamp(1.2rem, 1.65vw, 1.95rem);
  font-weight: 600;
  color: var(--ivory-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.adzan-adab-divider {
  width: 2px;
  height: clamp(28px, 3.6vh, 42px);
  background: linear-gradient(180deg, transparent, rgba(224, 183, 53, 0.55), transparent);
  flex-shrink: 0;
}

/* =============================================================================
   3. FASE COUNTDOWN IQOMAH
   ============================================================================= */
.iqomah-heading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(12px, 1.8vh, 22px);
}

.iqomah-main-title {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(3.2rem, 5.8vw, 6.4rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ivory-soft);
  line-height: 1.05;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 32px rgba(79, 214, 194, 0.25);
}

.iqomah-timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 3vh, 38px) clamp(50px, 7vw, 110px);
  min-width: clamp(340px, 42vw, 640px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(79, 214, 194, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(8, 48, 36, 0.85) 0%, rgba(5, 30, 22, 0.92) 100%);
  border: 2px solid rgba(79, 214, 194, 0.48);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 28px rgba(79, 214, 194, 0.2);
  margin-bottom: clamp(14px, 2vh, 26px);
  transition: all 0.3s ease;
}

.iqomah-timer-box.urgent {
  border-color: #e53935;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

.iqomah-timer-digits {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: clamp(6.2rem, 11vw, 12rem);
  font-weight: 900;
  color: var(--teal-soft);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  text-shadow: none;
}

.iqomah-timer-box.urgent .iqomah-timer-digits {
  color: #e53935;
  text-shadow: none !important;
}

.iqomah-timer-accent {
  width: 70%;
  height: 2px;
  margin-top: clamp(8px, 1vh, 16px);
  background: linear-gradient(90deg, transparent, rgba(79, 214, 194, 0.85), transparent);
}

.iqomah-notice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: min(94%, 960px);
  padding: clamp(14px, 1.8vh, 24px) clamp(28px, 3.2vw, 52px);
  border-radius: 20px;
  background: rgba(240, 201, 106, 0.08);
  border: 1.5px solid rgba(240, 201, 106, 0.32);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.iqomah-quote {
  margin: 0;
  font-size: clamp(1.25rem, 1.7vw, 2.1rem);
  font-style: italic;
  color: var(--ivory-soft);
  line-height: 1.45;
  text-align: center;
}

.iqomah-quote-source {
  font-size: clamp(1rem, 1.3vw, 1.5rem);
  color: var(--amber-soft);
  font-weight: 700;
}

/* =============================================================================
   4. FASE SAAT SHOLAT (Mode Khusyuk & Hening - Font Besar Terbaca dari Jauh)
   ============================================================================= */
.adzan-phase--saat-sholat {
  max-width: min(96%, 1320px);
}

.sholat-silent-banner {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
  padding: clamp(14px, 1.8vh, 22px) clamp(32px, 3.5vw, 56px);
  border-radius: 999px;
  background: rgba(224, 83, 83, 0.18);
  border: 2px solid rgba(224, 83, 83, 0.55);
  color: #ffb3b3;
  font-size: clamp(1.4rem, 2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-top: clamp(-28px, -4vh, -12px);
  margin-bottom: clamp(20px, 3.2vh, 40px);
  box-shadow: 0 8px 32px rgba(224, 83, 83, 0.25), 0 4px 24px rgba(0, 0, 0, 0.5);
}

.sholat-silent-icon {
  width: clamp(32px, 2.8vw, 46px);
  height: clamp(32px, 2.8vw, 46px);
  flex-shrink: 0;
}

.sholat-hadith-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.4vh, 26px);
  width: 100%;
  max-width: 100%;
  padding: clamp(28px, 3.8vh, 52px) clamp(28px, 3.6vw, 64px);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.8px solid rgba(240, 201, 106, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.sholat-hadith-arabic {
  margin: 0;
  font-family: "Amiri", "Scheherazade New", "Traditional Arabic", serif;
  font-size: clamp(3.2rem, 5.2vw, 6.4rem);
  font-weight: 700;
  color: var(--gold-highlight);
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-align: center;
  text-shadow: 0 4px 26px rgba(224, 183, 53, 0.45);
}

.sholat-hadith-divider {
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(224, 183, 53, 0.55), transparent);
}

.sholat-hadith {
  margin: 0;
  font-size: clamp(1.45rem, 2.1vw, 2.6rem);
  font-style: italic;
  color: var(--ivory-soft);
  opacity: 0.96;
  max-width: 1140px;
  line-height: 1.55;
  text-align: center;
}

.sholat-hadith-source {
  font-size: clamp(1.1rem, 1.5vw, 1.8rem);
  color: var(--amber-soft);
  font-style: normal;
  display: inline-block;
  margin-top: clamp(8px, 1.2vh, 16px);
  font-weight: 700;
}

/* =============================================================================
   TEST TOOLBAR (Discreet Preview Controller)
   ============================================================================= */
.adzan-test-toolbar {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(4, 24, 18, 0.96);
  border: 1px solid rgba(240, 201, 106, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.adzan-test-toolbar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.adzan-test-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ivory-soft);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.adzan-test-btn:hover {
  background: var(--amber-soft);
  color: #041812;
  border-color: var(--amber-soft);
}

.adzan-test-btn--demo {
  background: rgba(27, 199, 207, 0.2);
  border-color: rgba(79, 214, 194, 0.5);
  color: var(--teal-soft);
}

.adzan-test-btn--demo:hover {
  background: var(--teal-soft);
  color: #041812;
}

.adzan-test-btn--close {
  background: rgba(224, 83, 83, 0.2);
  border-color: rgba(224, 83, 83, 0.4);
  color: #ff9999;
}

.adzan-test-btn--close:hover {
  background: #e05353;
  color: #fff;
}
