/* ==========================================================================
   Premium Wedding Invitation Custom CSS
   ========================================================================== */

:root {
  --wedding-primary: #8C6A5C;
  --wedding-primary-light: #BCA396;
  --wedding-secondary: #D4C3B3;
  --wedding-accent: #E8D8CE;
  --wedding-dark: #2C2523;
  --wedding-light: #FBF9F8;
  --wedding-success: #25D366;
  --wedding-glass: rgba(255, 255, 255, 0.75);
  --wedding-glass-dark: rgba(44, 37, 35, 0.85);
  --wedding-radius: 12px;
  --wedding-font-serif: 'Playfair Display', serif;
  --wedding-font-sans: 'Inter', sans-serif;
  --wedding-font-cursive: 'Great Vibes', cursive;
  --wedding-font-display: 'Cinzel', serif;
}

/* Base scroll lock */
body.invitation-locked {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Digital Envelope Cover */
.envelope-cover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--wedding-light);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: var(--wedding-font-sans);
}

.envelope-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
}

.envelope-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Floral Ornaments */
.envelope-ornament {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  width: 100%; /* max-width controlled by Elementor */
  max-width: 250px;
  object-fit: contain;
}
.ornament-tl { top: -5%; left: -5%; }
.ornament-tr { top: -5%; right: -5%; }
.ornament-bl { bottom: -5%; left: -5%; }
.ornament-br { bottom: -5%; right: -5%; }

@keyframes ornament-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
@keyframes ornament-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes ornament-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.envelope-ornament.anim-float { animation: ornament-float 6s ease-in-out infinite; }
.envelope-ornament.anim-breathe { animation: ornament-breathe 8s ease-in-out infinite; }
.envelope-ornament.anim-rotate { animation: ornament-rotate 30s linear infinite; }

.envelope-wrapper {
  position: relative;
  width: 90%;
  max-width: 460px;
  height: 600px;
  background: #fff;
  border-radius: var(--wedding-radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid var(--wedding-accent);
  background-image: radial-gradient(var(--wedding-accent) 0.5px, transparent 0.5px), radial-gradient(var(--wedding-accent) 0.5px, transparent 0.5px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  z-index: 2;
}

.envelope-crest {
  font-family: var(--wedding-font-display);
  font-size: 42px;
  color: var(--wedding-primary);
  margin-bottom: 20px;
  border: 2px solid var(--wedding-primary);
  width: 80px;
  height: 80px;
  line-height: 76px;
  border-radius: 50%;
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.envelope-greeting-title {
  font-family: var(--wedding-font-cursive);
  font-size: 48px;
  color: var(--wedding-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.envelope-mempelai {
  font-family: var(--wedding-font-display);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--wedding-dark);
  margin-bottom: 30px;
}

.envelope-guest-card {
  background: var(--wedding-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--wedding-accent);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  width: 100%;
  box-sizing: border-box;
}

.envelope-guest-card p {
  margin: 0 0 8px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--wedding-primary);
}

.envelope-guest-name {
  font-family: var(--wedding-font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--wedding-dark);
}

.envelope-guest-group {
  font-size: 12px;
  background: var(--wedding-primary-light);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 5px;
}

.btn-open-invitation {
  background: var(--wedding-primary);
  color: #fff !important;
  border: none;
  padding: 15px 35px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(140, 106, 92, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-open-invitation:hover {
  background: var(--wedding-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ══════════════════════════════════════════════════════════
   Cinematic Hero Reveal — Photo / Video / YouTube Modes
   ══════════════════════════════════════════════════════════ */
.cinematic-hero-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #111;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* ── Self-Hosted Video BG ─────────────────────── */
.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
}

/* ── YouTube Video BG ─────────────────────────── */
.hero-yt-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 inverse */
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.hero-yt-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.hero-yt-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1.2s ease;
}

/* ── Dark Overlay ─────────────────────────────── */
.cinematic-hero-wrapper .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ── Text Content ─────────────────────────────── */
.cinematic-hero-wrapper .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  font-family: var(--wedding-font-sans);
  max-width: 800px;
}

.hero-kicker {
  font-family: var(--wedding-font-display);
  letter-spacing: 4px;
  margin-bottom: 15px;
  text-transform: uppercase;
  animation: heroFadeInDown 1s both;
}

.hero-couple-names {
  font-family: var(--wedding-font-cursive);
  font-weight: normal;
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  animation: heroFadeIn 1.2s 0.3s both;
}

.hero-divider-line {
  width: 60px;
  height: 2px;
  background: currentColor;
  margin: 0 auto 25px auto;
  opacity: 0.7;
  animation: heroFadeIn 1s 0.5s both;
}

.hero-date {
  font-family: var(--wedding-font-serif);
  letter-spacing: 2px;
  font-style: italic;
  animation: heroFadeIn 1s 0.7s both;
}

/* ── Scroll Indicator ─────────────────────────── */
.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  color: inherit;
  animation: heroBounce 2s infinite;
}

.hero-scroll-indicator .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #fff;
}

/* ── Keyframes ────────────────────────────────── */
@keyframes heroFadeInDown {
  0%   { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes heroFadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes heroBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .cinematic-hero-wrapper {
    min-height: 100vh;
    min-height: 100svh; /* safe viewport height for mobile browsers */
  }

  .hero-couple-names {
    font-size: 42px !important;
  }

  .hero-kicker {
    font-size: 14px !important;
    letter-spacing: 2px;
  }

  .hero-date {
    font-size: 14px !important;
  }

  .hero-yt-wrapper {
    min-width: 300%;
    min-height: 100vh;
  }
}

/* Floating Audio Controller */
.floating-music-btn {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--wedding-primary);
  color: #fff;
  border: 2px solid #fff;
  z-index: 9999;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.floating-music-btn.playing {
  animation: spinDisc 6s linear infinite;
}

.floating-music-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@keyframes spinDisc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Aesthetic Countdown */
.wedding-countdown-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  font-family: var(--wedding-font-sans);
}

.countdown-item {
  min-width: 70px;
  padding: 12px;
  border-radius: var(--wedding-radius);
  background: var(--wedding-glass);
  border: 1px solid var(--wedding-accent);
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.countdown-num {
  font-family: var(--wedding-font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--wedding-primary);
  display: block;
}

.countdown-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wedding-dark);
  margin-top: 3px;
  display: block;
}

/* Love Story Timeline */
.love-story-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.love-story-timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--wedding-accent);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: #fff;
  border: 4px solid var(--wedding-primary);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-left {
  left: 0;
  text-align: right;
}

.timeline-right {
  left: 50%;
}

.timeline-right::after {
  left: -8px;
}

.timeline-content {
  padding: 20px;
  background: #fff;
  position: relative;
  border-radius: var(--wedding-radius);
  border: 1px solid var(--wedding-accent);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.timeline-date {
  font-family: var(--wedding-font-display);
  font-weight: bold;
  color: var(--wedding-primary);
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: 1px;
}

.timeline-title {
  font-family: var(--wedding-font-serif);
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--wedding-dark);
}

/* Event Cards */
.event-card {
  background: #fff;
  border: 1px solid var(--wedding-accent);
  border-radius: var(--wedding-radius);
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.03);
  margin-bottom: 20px;
}

.event-icon {
  font-size: 32px;
  color: var(--wedding-primary);
  margin-bottom: 15px;
}

.event-title {
  font-family: var(--wedding-font-display);
  font-size: 22px;
  color: var(--wedding-dark);
  margin-bottom: 15px;
}

.event-details {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.event-details li {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

/* Advanced RSVP Form */
.rsvp-form-container {
  background: var(--wedding-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--wedding-accent);
  border-radius: var(--wedding-radius);
  padding: 35px;
  max-width: 500px;
  margin: 0 auto;
  font-family: var(--wedding-font-sans);
}

.rsvp-form-title {
  font-family: var(--wedding-font-serif);
  font-size: 24px;
  text-align: center;
  margin-bottom: 25px;
  color: var(--wedding-dark);
}

.rsvp-group {
  margin-bottom: 20px;
}

.rsvp-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--wedding-dark);
}

.rsvp-input, .rsvp-select, .rsvp-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--wedding-accent);
  background: #fff;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.rsvp-radio-group {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}

.rsvp-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.rsvp-submit-btn {
  width: 100%;
  background: var(--wedding-primary);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}

.rsvp-submit-btn:hover {
  background: var(--wedding-dark);
}

/* Custom Notification Toast */
.wedding-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--wedding-dark);
  color: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--wedding-font-sans);
  font-size: 14px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wedding-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Digital Guestbook Feed */
.guestbook-feed-container {
  max-width: 700px;
  margin: 30px auto;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 10px;
}

.guestbook-card {
  background: #fff;
  border: 1px solid var(--wedding-accent);
  border-radius: var(--wedding-radius);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.guestbook-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
}

.guestbook-name {
  font-weight: bold;
  font-family: var(--wedding-font-serif);
  font-size: 15px;
  color: var(--wedding-primary);
}

.guestbook-status {
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
}

.guestbook-text {
  font-size: 13.5px;
  color: #555;
  line-height: 1.5;
  font-style: italic;
}

/* Gifting and Accounts */
.gift-card {
  background: linear-gradient(135deg, var(--wedding-primary) 0%, var(--wedding-dark) 100%);
  color: #fff;
  border-radius: var(--wedding-radius);
  padding: 25px;
  max-width: 380px;
  margin: 20px auto;
  position: relative;
  box-shadow: 0 10px 25px rgba(140, 106, 92, 0.3);
}

.gift-card-bank {
  font-family: var(--wedding-font-display);
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 25px;
  opacity: 0.8;
}

.gift-card-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 20px;
  letter-spacing: 3px;
  margin-bottom: 15px;
}

.gift-card-holder {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-copy-gift {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-copy-gift:hover {
  background: rgba(255,255,255,0.3);
}

/* Dress Code Swatches */
.dresscode-palette {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.dresscode-color {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.dresscode-color span {
  display: none;
  position: absolute;
  bottom: -25px;
  font-size: 11px;
  color: var(--wedding-dark);
}

/* Audio Uploader component styling */
.audio-uplink-container {
  text-align: center;
  background: var(--wedding-light);
  border: 2px dashed var(--wedding-accent);
  padding: 20px;
  border-radius: var(--wedding-radius);
  margin-bottom: 20px;
}

.audio-record-btn {
  background: #d93f3f;
  color: #fff;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 63, 63, 0.4);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
}

.audio-record-btn.recording {
  animation: pulseRecording 1.5s infinite;
  border-radius: 8px;
}

@keyframes pulseRecording {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217, 63, 63, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(217, 63, 63, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217, 63, 63, 0); }
}

/* Interactive Quiz Styling */
.quiz-widget-card {
  background: #fff;
  border: 1px solid var(--wedding-accent);
  padding: 30px;
  border-radius: var(--wedding-radius);
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 6px 15px rgba(0,0,0,0.02);
}

.quiz-question {
  font-family: var(--wedding-font-serif);
  font-size: 18px;
  margin-bottom: 20px;
  text-align: center;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option-btn {
  background: var(--wedding-light);
  border: 1px solid var(--wedding-accent);
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: all 0.2s;
}

.quiz-option-btn:hover {
  background: var(--wedding-accent);
}

.quiz-option-btn.correct {
  background: #d4edda !important;
  border-color: #c3e6cb !important;
  color: #155724;
}

.quiz-option-btn.wrong {
  background: #f8d7da !important;
  border-color: #f5c6cb !important;
  color: #721c24;
}

/* Responsive adjustments */
@media(max-width: 768px) {
  .love-story-timeline::after {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item::after {
    left: 23px;
    right: auto;
  }
  .timeline-left {
    left: 0;
    text-align: left;
  }
  .timeline-right {
    left: 0;
  }
}
