/* ═══════════════════════════════════════════════════════════
   COMPONENTS — Reusable UI Elements
   ═══════════════════════════════════════════════════════════ */

/* ─── GLASS CARD ─────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
}

.glass-card--strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
}

.glass-card--subtle {
  background: var(--glass-bg-subtle);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out-quart);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  cursor: pointer;
}

.btn-primary {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--duration-slow) var(--ease-out-expo);
  pointer-events: none;
}

.btn-primary:hover::after,
.btn-primary:focus-visible::after {
  left: 200%;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold), var(--color-gold-light));
  color: var(--color-white);
  border: none;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.35);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-gold-light);
  color: var(--color-gold);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-gold-glow);
  border-color: var(--color-gold);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #1E8E3E, #25D366);
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.35);
  transform: translateY(-2px);
}

.btn-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ─── MONOGRAM ───────────────────────────────────────── */
.monogram {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
}

.monogram__letter {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: var(--weight-light);
  color: var(--color-gold);
  line-height: 0.9;
}

.monogram__amp {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-light);
  color: var(--color-gold-light);
  line-height: 1.2;
  font-style: italic;
}

.monogram--small .monogram__letter {
  font-size: var(--text-2xl);
}

.monogram--small .monogram__amp {
  font-size: var(--text-base);
}

.monogram--inline {
  flex-direction: row;
  gap: var(--space-2);
}

/* ─── PHOTO FRAME ────────────────────────────────────── */
.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--glass-border);
  border-radius: inherit;
  pointer-events: none;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.photo-frame:hover img {
  transform: scale(1.03);
}

.photo-frame--gold::after {
  border: 2px solid var(--color-gold-light);
  box-shadow: inset 0 0 20px rgba(201, 169, 110, 0.1);
}

/* Photo placeholder */
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--color-champagne-light), var(--color-blush-light));
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-gold-pale);
}

.photo-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

/* ─── COUNTDOWN CARD ─────────────────────────────────── */
.countdown-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-glass);
  min-width: 72px;
}

.countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.countdown-card__number {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: var(--weight-light);
  color: var(--color-text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
  transition: transform var(--duration-fast) var(--ease-spring);
}

.countdown-card__number.pop {
  animation: countPop 300ms var(--ease-spring);
}

.countdown-card__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-text-light);
}

/* ─── MUSIC TOGGLE ───────────────────────────────────── */
.music-toggle {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-music);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-out-quart);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.music-toggle.is-active {
  opacity: 1;
  pointer-events: auto;
}

.music-toggle.is-playing {
  animation: musicPulse 2s ease-in-out infinite;
}

.music-toggle.is-playing .music-toggle__icon {
  animation: rotateSlow 4s linear infinite;
}

.music-toggle:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold);
  transform: scale(1.05);
}

.music-toggle__icon {
  display: flex;
  transition: transform var(--duration-normal) ease;
}

/* ─── NAVIGATION ─────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border-top: 1px solid var(--glass-border);
  padding: var(--space-2) var(--space-2) env(safe-area-inset-bottom, var(--space-2));
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.bottom-nav.is-visible {
  transform: translateY(0);
}

.bottom-nav__list {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item:hover,
.bottom-nav__item.is-active {
  background: var(--color-gold-glow);
}

.bottom-nav__item.is-active .bottom-nav__icon {
  color: var(--color-gold);
}

.bottom-nav__item.is-active .bottom-nav__label {
  color: var(--color-gold);
}

.bottom-nav__icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-light);
  transition: color var(--duration-fast) ease;
}

.bottom-nav__icon svg {
  width: 100%;
  height: 100%;
}

.bottom-nav__label {
  font-size: 9px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-light);
  transition: color var(--duration-fast) ease;
}

/* ─── FORM ELEMENTS ──────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239B8B7E' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-8);
}

/* Radio buttons styled */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.radio-option:hover {
  background: var(--glass-bg);
  border-color: var(--color-gold-light);
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-gold);
}

.radio-option input[type="radio"]:checked + span {
  color: var(--color-text-primary);
  font-weight: var(--weight-medium);
}

/* ─── LIGHTBOX ───────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform: scale(0.9);
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.lightbox.is-open .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }

.lightbox__counter {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

/* ─── INFO CARD (Ceremony/Reception) ─────────────────── */
.info-card {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.info-card__icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
  color: var(--color-gold);
}

.info-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
}

.info-card__detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.info-card__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-gold);
}

.info-card__value {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.info-card__pending {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  padding: var(--space-4) 0;
}
