/* ═══════════════════════════════════════════════════════════════
   COMMON WEDDING FEATURES — Jyothi & Eeshan Wedding 2026
   Features: Sakura, Gate, Music Request, Google Calendar, Favicon
   ═══════════════════════════════════════════════════════════════ */

/* ── SAKURA PETALS ─────────────────────────────────────── */
.wedding-sakura-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.sakura-petal {
  position: absolute;
  top: -20px;
  border-radius: 150% 0% 150% 0%;
  opacity: 0.85;
  animation: sakuraFall linear infinite;
  will-change: transform, opacity;
}

@keyframes sakuraFall {
  0% {
    transform: translateY(-20px) rotate(0deg) translateX(0);
    opacity: 0.9;
  }
  25% {
    transform: translateY(25vh) rotate(90deg) translateX(30px);
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(-20px);
  }
  75% {
    transform: translateY(75vh) rotate(270deg) translateX(40px);
  }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(10px);
    opacity: 0;
  }
}

/* ── GATE OVERLAY ─────────────────────────────────────── */
.wedding-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  font-family: 'Georgia', 'Palatino Linotype', serif;
}

.wedding-gate-overlay.gate-opened .gate-left {
  transform: translateX(-100%);
}

.wedding-gate-overlay.gate-opened .gate-right {
  transform: translateX(100%);
}

.gate-left,
.gate-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
  position: relative;
  overflow: hidden;
}

.gate-left {
  background: linear-gradient(135deg, #3d0a0a 0%, #7b1a1a 40%, #c4243a 70%, #9b1a2a 100%);
  border-right: 4px solid #ffd700;
}

.gate-right {
  background: linear-gradient(225deg, #3d0a0a 0%, #7b1a1a 40%, #c4243a 70%, #9b1a2a 100%);
  border-left: 4px solid #ffd700;
}

.gate-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #ffd700;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

.gate-content-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gate-flower {
  font-size: clamp(24px, 5vw, 48px);
  opacity: 0.7;
  display: block;
}

.gate-motif {
  width: 40px;
  height: 40px;
  border: 2px solid #ffd700;
  transform: rotate(45deg);
  opacity: 0.5;
  position: absolute;
}

.gate-motif-tl { top: 10%; left: 5%; }
.gate-motif-tr { top: 10%; right: 5%; }
.gate-motif-bl { bottom: 10%; left: 5%; }
.gate-motif-br { bottom: 10%; right: 5%; }

.gate-center-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100000;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 260px;
}

.gate-invite-text {
  color: #ffd700;
  font-size: clamp(14px, 2vw, 20px);
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  letter-spacing: 0.05em;
}

.gate-names {
  font-size: clamp(22px, 4vw, 42px);
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 16px rgba(255,215,0,0.6);
  line-height: 1.1;
}

.gate-open-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #ffd700, #ff9000, #ffd700);
  background-size: 200% 200%;
  color: #2d0a0a;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(255,215,0,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
  animation: shimmerBtn 2.5s ease infinite;
  transition: transform 0.2s, box-shadow 0.2s;
  pointer-events: all;
  position: relative;
  overflow: hidden;
}

.gate-open-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: tapeSweep 2s ease-in-out infinite;
}

@keyframes tapeSweep {
  0% { left: -75%; }
  100% { left: 125%; }
}

@keyframes shimmerBtn {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.gate-open-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(255,215,0,0.7);
}

.gate-tape {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, 
    rgba(255,215,0,0.9) 0%, 
    rgba(255,180,0,0.7) 25%, 
    rgba(255,215,0,0.9) 50%,
    rgba(255,180,0,0.7) 75%, 
    rgba(255,215,0,0.9) 100%
  );
  transform: translateY(-50%);
  z-index: 1;
  box-shadow: 0 0 12px rgba(255,215,0,0.4);
  transition: opacity 0.5s;
}

.gate-opened .gate-tape {
  opacity: 0;
}

/* ── FLOATING MUSIC REQUEST BUTTON ───────────────────── */
.wedding-music-request-btn {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #c2185b, #e91e63, #f06292);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  box-shadow: 0 4px 20px rgba(194, 24, 91, 0.5);
  z-index: 9998;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: musicPulse 2s ease-in-out infinite;
}

.wedding-music-request-btn:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 6px 28px rgba(194, 24, 91, 0.7);
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(194, 24, 91, 0.5); }
  50% { box-shadow: 0 4px 32px rgba(194, 24, 91, 0.8), 0 0 0 8px rgba(194, 24, 91, 0.1); }
}

/* ── MUSIC REQUEST MODAL ─────────────────────────────── */
.wedding-music-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.wedding-music-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.wedding-music-modal {
  background: linear-gradient(145deg, #fff9f9, #fff5f8);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(194, 24, 91, 0.3);
  border: 1px solid rgba(194, 24, 91, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s;
  scrollbar-width: thin;
}

.wedding-music-modal-overlay.open .wedding-music-modal {
  transform: scale(1) translateY(0);
}

.wedding-music-modal h2 {
  font-size: 22px;
  font-weight: bold;
  color: #c2185b;
  margin: 0 0 6px;
  text-align: center;
}

.wedding-music-modal p.subtitle {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin: 0 0 20px;
}

.wm-tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: #f5e7ed;
  border-radius: 10px;
  padding: 3px;
}

.wm-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #c2185b;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.wm-tab.active {
  background: #c2185b;
  color: white;
}

.wm-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #f0aec5;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 10px;
  color: #333;
  background: white;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.wm-form input:focus {
  border-color: #c2185b;
}

.wm-form button[type="submit"] {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #c2185b, #e91e63);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.wm-form button[type="submit"]:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.wm-success-msg {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 10px;
  display: none;
}

.wm-playlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.wm-playlist-item {
  background: white;
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 4px solid #e91e63;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.wm-playlist-item .song-name {
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

.wm-playlist-item .song-artist {
  font-size: 12px;
  color: #888;
  margin: 2px 0;
}

.wm-playlist-item .song-requester {
  font-size: 11px;
  color: #c2185b;
  font-style: italic;
}

.wm-empty {
  text-align: center;
  color: #bbb;
  font-size: 14px;
  padding: 20px 0;
}

.wm-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #888;
  line-height: 1;
}

.wm-modal-inner {
  position: relative;
}

/* ── GOOGLE CALENDAR BUTTON ──────────────────────────── */
.wedding-cal-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #1a73e8, #4285f4);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.45);
  z-index: 9998;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wedding-cal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26, 115, 232, 0.6);
}

.wedding-cal-btn .cal-icon {
  font-size: 16px;
}

/* ── SHARED BACKGROUND MUSIC PLAYER ───────────────────── */
.wedding-shared-bgm-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: white;
  border: 1.5px solid #ffd700;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: transform 0.2s, background-color 0.2s;
}

.wedding-shared-bgm-btn:hover {
  transform: scale(1.08);
  background-color: #fff5f5;
}

.wedding-shared-bgm-btn.playing {
  animation: musicRotate 4s linear infinite;
}

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