/* ===== KAD KAHWIN DIGITAL — STYLES ===== */

/* Font Classes */
.font-display { font-family: 'Great Vibes', cursive; }
.font-serif { font-family: 'Cormorant Garamond', serif; }
.font-sans { font-family: 'Inter', sans-serif; }

/* Cream color utility */
.bg-cream-50 { background-color: #FFFDF5; }
.bg-cream-100 { background-color: #FFF9E8; }

/* ===== EDIT MODE STYLES ===== */

/* Editable elements — visual hint in edit mode */
body.edit-mode [contenteditable="true"] {
  outline: 2px dashed transparent;
  outline-offset: 4px;
  border-radius: 4px;
  transition: outline-color 0.2s ease;
  cursor: text;
}

body.edit-mode [contenteditable="true"]:hover {
  outline-color: rgba(217, 119, 6, 0.4); /* amber-500/40 */
  background-color: rgba(254, 243, 199, 0.3); /* amber-100/30 */
}

body.edit-mode [contenteditable="true"]:focus {
  outline-color: rgba(217, 119, 6, 0.7); /* amber-500/70 */
  background-color: rgba(254, 243, 199, 0.5); /* amber-100/50 */
}

/* Edit-only elements visible only in edit mode */
body.edit-mode .edit-only {
  display: block !important;
}

body.edit-mode .edit-only.flex,
body.edit-mode .edit-only.inline-flex {
  display: flex !important;
}

body.edit-mode .edit-only.inline-block {
  display: inline-block !important;
}

/* Toolbar buttons — active states */
body.edit-mode #btnToggleEdit {
  background-color: #92400e; /* amber-800 */
}

body:not(.edit-mode) #btnSave {
  opacity: 0.5;
  pointer-events: none;
}

/* ===== PREVIEW MODE ===== */
body.preview-mode #toolbar {
  transform: translateY(-100%);
}

body.preview-mode #musicToggle {
  opacity: 0.6;
}

/* ===== CARD ANIMATIONS ===== */

/* Fade-in on scroll */
section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero section always visible */
section:first-of-type {
  opacity: 1;
  transform: none;
}

/* ===== GALLERY ===== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Delete button on gallery items (edit mode) */
.gallery-item .delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
}

body.edit-mode .gallery-item .delete-btn {
  display: flex;
}

/* ===== COUNTDOWN ===== */
#countdown > div > div {
  transition: transform 0.3s ease;
}

#countdown > div:hover > div {
  transform: scale(1.05);
}

/* ===== RSVP FORM ===== */
#rsvpForm input:focus,
#rsvpForm select:focus,
#rsvpForm textarea:focus {
  outline: none;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 400px) {
  #countdown {
    gap: 0.5rem;
  }
  #countdown > div > div {
    min-width: 55px !important;
    padding: 0.5rem !important;
    font-size: 1.5rem !important;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fef3c7;
}
::-webkit-scrollbar-thumb {
  background: #d4a574;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b8946a;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
  background: #1a1a1a;
}
.dark ::-webkit-scrollbar-thumb {
  background: #4a3a2a;
}

/* ===== TOAST ===== */
#toast.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== MAP ===== */
#mapContainer {
  transition: box-shadow 0.3s ease;
}

/* ===== MUSIC PULSE ANIMATION ===== */
@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

#musicToggle.playing #musicIcon {
  animation: musicPulse 1.5s ease-in-out infinite;
}

/* ===== HERO IMAGE OVERLAY GRADIENT ===== */
#heroImageContainer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,253,245,0.3) 0%, rgba(255,253,245,0.5) 50%, rgba(255,253,245,0.7) 100%);
  pointer-events: none;
}

.dark #heroImageContainer::after {
  background: linear-gradient(to bottom, rgba(17,17,17,0.4) 0%, rgba(17,17,17,0.6) 50%, rgba(17,17,17,0.8) 100%);
}

/* ===== LINK MODAL ===== */
#linkModal > div {
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#linkModal.opacity-100 > div {
  transform: scale(1);
}

/* ===== GUEST MODE — hide toolbar ===== */
body.guest-mode #toolbar {
  display: none !important;
}

body.guest-mode #card {
  padding-top: 0 !important;
}

body.guest-mode .edit-only {
  display: none !important;
}
