/* ==============================================================================
   GDE.VISUAL — Multi-Theme Engine for Digital Invitations
   Defines color palettes for White-Maroon, Sage Botanical, Royal Navy, and Warm Terracotta.
   ============================================================================== */

/* --- 1. White Maroon (Default Classic Sacred) --- */
:root,
.theme-white-maroon {
  --theme-bg: #FBF5EA;
  --theme-primary: #7A1F2B;
  --theme-secondary: #B8893B;
  --theme-text-dark: #4A2C17;
  --theme-text-muted: #6B4423;
  --theme-card-bg: #FFF8F3;
  --theme-border-gold: rgba(184, 137, 59, 0.3);
}

/* --- 2. Sage Botanical (Nature, Fresh, Modern Minimalist) --- */
.theme-sage-botanical {
  --theme-bg: #F4F6F2;
  --theme-primary: #2D4A3E;
  --theme-secondary: #8FA89B;
  --theme-text-dark: #1E2D27;
  --theme-text-muted: #4B6358;
  --theme-card-bg: #EAEFEA;
  --theme-border-gold: rgba(143, 168, 155, 0.35);
}

/* --- 3. Royal Navy & Gold (Regal, Midnight Elegance) --- */
.theme-royal-navy {
  --theme-bg: #0F172A;
  --theme-primary: #D4AF37;
  --theme-secondary: #E2C974;
  --theme-text-dark: #F8FAFC;
  --theme-text-muted: #94A3B8;
  --theme-card-bg: #1E293B;
  --theme-border-gold: rgba(212, 175, 55, 0.35);
}

/* --- 4. Warm Terracotta (Rustic, Earthy Sunset) --- */
.theme-warm-terracotta {
  --theme-bg: #FDF6F0;
  --theme-primary: #A44A3F;
  --theme-secondary: #D9822B;
  --theme-text-dark: #3E2723;
  --theme-text-muted: #795548;
  --theme-card-bg: #F7EBE1;
  --theme-border-gold: rgba(217, 130, 43, 0.35);
}

/* --- 5. Dark Luxury (Modern Luxury, Editorial Obsidian & Champagne Gold) --- */
html.theme-dark-luxury,
html.theme-dark-luxury body,
.theme-dark-luxury {
  --theme-bg: #111215;
  --theme-primary: #F3EBDD;
  --theme-secondary: #C5A059;
  --theme-text-dark: #F7F3EB;
  --theme-text-muted: #A6A095;
  --theme-card-bg: #1A1C20;
  --theme-border-gold: rgba(197, 160, 89, 0.25);
  background-color: #111215 !important;
  color: #F7F3EB !important;
}

/* Base Canvas & Panels di Dark Luxury */
.theme-dark-luxury #mainContent,
.theme-dark-luxury #coverOverlay,
.theme-dark-luxury .bg-\[\#FBF5EA\],
.theme-dark-luxury .bg-surface,
html.theme-dark-luxury #coverOverlay,
html.theme-dark-luxury #mainContent {
  background-color: #111215 !important;
  color: #F7F3EB !important;
}

/* Tulisan Headline Seksi */
.theme-dark-luxury .font-headline-md,
.theme-dark-luxury .font-headline-sm {
  color: #F7F3EB !important;
}

/* Ornamen Bunga Frangipani di Salam Pembuka */
.theme-dark-luxury .w-14.h-14.rounded-full.bg-surface-container {
  background-color: #1A1C20 !important;
  border-color: rgba(197, 160, 89, 0.35) !important;
}

.theme-dark-luxury .w-14.h-14.rounded-full.bg-surface-container span {
  color: #C5A059 !important;
}

/* Panel Desktop Kiri & Kanan */
.theme-dark-luxury aside#desktopPanelLeft {
  background-color: #0B0C0E !important;
}

.theme-dark-luxury .lg\:bg-\[\#FBF5EA\] {
  background-color: #0B0C0E !important;
}

/* Gradien Foto Cover (Hitam Transparan ke Hitam Solid) */
.theme-dark-luxury #coverOverlay div[style*="linear-gradient(to bottom, rgba(251,245,234"] {
  background: linear-gradient(to bottom, rgba(17,18,21,0.98) 0%, rgba(17,18,21,0.92) 28%, rgba(17,18,21,0.65) 48%, rgba(17,18,21,0.3) 68%, rgba(17,18,21,0.08) 86%, rgba(17,18,21,0) 100%) !important;
}

.theme-dark-luxury #coverOverlay div[style*="linear-gradient(to top, rgba(251,245,234"] {
  background: linear-gradient(to top, rgba(17,18,21,1) 0%, rgba(17,18,21,0.95) 15%, rgba(17,18,21,0.7) 25%, rgba(17,18,21,0.25) 38%, rgba(17,18,21,0) 50%) !important;
}

/* Gradien Foto Hero */
.theme-dark-luxury #heroPhotoWrap div[style*="linear-gradient(to bottom, rgba(251,245,234"] {
  background: linear-gradient(to bottom, rgba(17,18,21,0) 0%, rgba(17,18,21,0) 48%, rgba(17,18,21,0.45) 60%, rgba(17,18,21,0.85) 72%, rgba(17,18,21,0.98) 82%, #111215 89%, #111215 100%) !important;
}

/* Nama Mempelai di Cover & Hero: Hilangkan text-shadow di Dark Luxury */
.theme-dark-luxury #coverCoupleNames,
.theme-dark-luxury #heroCoupleNames {
  color: #F7F3EB !important;
  text-shadow: none !important;
}

.theme-dark-luxury #coverCoupleNames {
  white-space: nowrap !important;
  font-size: clamp(30px, 8.5vw, 42px) !important;
  letter-spacing: -0.01em !important;
}

.theme-dark-luxury #coverCoupleNames .font-script {
  font-size: 1.1em !important;
}

.theme-dark-luxury #coverDateText,
.theme-dark-luxury .entrance-date,
.theme-dark-luxury .entrance-date span,
.theme-dark-luxury .entrance-wedding-of,
.theme-dark-luxury .entrance-names,
.theme-dark-luxury .entrance-guest,
.theme-dark-luxury #heroSection [style*="text-shadow"],
.theme-dark-luxury #heroSection [style*="filter"],
.theme-dark-luxury #heroSection [style*="box-shadow"],
.theme-dark-luxury #heroTextWrap div[style*="filter"] {
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
}

.theme-dark-luxury .text-\[\#580B1C\] {
  color: #F7F3EB !important;
}

.theme-dark-luxury .text-\[\#4A2C17\] {
  color: #E2DDD5 !important;
}

.theme-dark-luxury .text-primary {
  color: #F7F3EB !important;
}

.theme-dark-luxury .text-on-surface,
.theme-dark-luxury .text-on-surface-variant {
  color: #D3CDC2 !important;
}

.theme-dark-luxury .text-secondary {
  color: #C5A059 !important;
}

/* Card Mempelai: Wadah Card Eksklusif Tanpa Border Emas (Clean Dark) */
.theme-dark-luxury #groomCard,
.theme-dark-luxury #brideCard {
  background-color: #17181C !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.7), 0 4px 10px -2px rgba(0, 0, 0, 0.4) !important;
  color: #F7F3EB !important;
}

.theme-dark-luxury #groomCard .bg-surface-container-high,
.theme-dark-luxury #brideCard .bg-surface-container-high {
  background-color: #212328 !important;
  border: none !important;
}

/* Kartu Profil Mempelai & Kartu Acara */
.theme-dark-luxury .bg-surface-container,
.theme-dark-luxury .bg-surface-container-low,
.theme-dark-luxury .event-card,
.theme-dark-luxury .bg-surface-container-high {
  background-color: #1A1C20 !important;
  border-color: rgba(197, 160, 89, 0.22) !important;
  color: #F7F3EB !important;
}

/* Perbaiki Warna Gradien di Background Acara: Menyatu ke Hitam (#111215) */
.theme-dark-luxury #eventsBgWrapper .bg-gradient-to-b {
  background: linear-gradient(to bottom, #111215 0%, rgba(17,18,21,0.65) 20%, rgba(17,18,21,0.15) 50%, rgba(17,18,21,0.65) 80%, #111215 100%) !important;
}

.theme-dark-luxury #eventsBgPhoto {
  opacity: 0.3 !important;
  filter: saturate(60%) contrast(105%) !important;
}

/* Tombol Aksi: Warna Krem Mewah dengan Shadow Halus Proporsional (Tanpa Shadow Merah Maroon) */
.theme-dark-luxury #btnOpenInvite,
.theme-dark-luxury .btn-pulse-glow {
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.7), 0 0 15px rgba(243, 235, 221, 0.2) !important;
  animation: pulseSoftDark 2.8s ease-in-out infinite 2.2s !important;
}

@keyframes pulseSoftDark {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.7), 0 0 15px rgba(243, 235, 221, 0.15);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.85), 0 0 25px rgba(197, 160, 89, 0.35);
  }
}

.theme-dark-luxury .bg-\[\#7A1F2B\] {
  background-color: #F3EBDD !important;
  color: #111215 !important;
  border-color: rgba(197, 160, 89, 0.4) !important;
}

.theme-dark-luxury .bg-\[\#7A1F2B\] span,
.theme-dark-luxury .bg-\[\#7A1F2B\] svg {
  color: #111215 !important;
}

.theme-dark-luxury .hover\:bg-\[\#7A1F2B\]:hover,
.theme-dark-luxury .hover\:bg-\[\#4A2C17\]:hover {
  background-color: #DFD5C3 !important;
  color: #111215 !important;
}

/* Kartu ATM Bank */
.theme-dark-luxury .bg-gradient-to-br.from-\[\#7A1F2B\] {
  background-image: linear-gradient(to bottom right, #202227, #131417, #0B0C0E) !important;
  border-color: rgba(197, 160, 89, 0.35) !important;
}

.theme-dark-luxury #rekeningNumber,
.theme-dark-luxury #rekeningNumberBride,
.theme-dark-luxury #rekeningHolder,
.theme-dark-luxury #rekeningHolderBride {
  color: #C5A059 !important;
}

.theme-dark-luxury #cardRekeningGroom p.text-\[\#ffb3b5\],
.theme-dark-luxury #cardRekeningBride p.text-\[\#ffb3b5\] {
  color: #D3CDC2 !important;
  opacity: 0.8 !important;
}

/* Penjagaan Presisi Tombol Salin di Pojok Kanan Bawah Kartu ATM */
#cardRekeningGroom,
#cardRekeningBride {
  min-height: 200px;
  box-sizing: border-box;
  overflow: hidden !important;
}

#btnCopyRekening,
#btnCopyRekeningBride {
  margin: 0 !important;
  transform-origin: center right;
}

/* Floating Audio Control */
.theme-dark-luxury aside#floatingAudioBtn button {
  background-color: #F3EBDD !important;
  color: #111215 !important;
  border-color: #C5A059 !important;
}

.theme-dark-luxury aside#floatingAudioBtn button span {
  color: #111215 !important;
}

/* Form Input & Textarea */
.theme-dark-luxury input,
.theme-dark-luxury textarea {
  background-color: #16181B !important;
  color: #F7F3EB !important;
  border-color: rgba(197, 160, 89, 0.3) !important;
}

.theme-dark-luxury input::placeholder,
.theme-dark-luxury textarea::placeholder {
  color: #8C867B !important;
}

/* Footer Section */
.theme-dark-luxury .bg-\[\#580B1C\],
.theme-dark-luxury footer {
  background-color: #0A0B0D !important;
  border-top-color: rgba(197, 160, 89, 0.2) !important;
}

/* Separator / Divider Gradien */
.theme-dark-luxury .via-\[\#9B7332\]\/75,
.theme-dark-luxury .via-\[\#9B7332\]\/70 {
  --tw-gradient-stops: var(--tw-gradient-from), #C5A059, var(--tw-gradient-to) !important;
}

/* Common Utility Classes mapped to current theme variables */
.text-theme-primary { color: var(--theme-primary) !important; }
.text-theme-secondary { color: var(--theme-secondary) !important; }
.bg-theme-primary { background-color: var(--theme-primary) !important; }
.bg-theme-card { background-color: var(--theme-card-bg) !important; }
.border-theme-gold { border-color: var(--theme-border-gold) !important; }
