/* ==========================================================================
   WeddingHub — style.css
   Global design tokens, reset, typography. Shared by every page.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand palette (Section 23) — Royal Premium refinement adds blush + ivory */
  --gold: #D4AF37;
  --gold-light: #E8CE7A;
  --gold-dark: #A9862B;
  --maroon: #800020;
  --maroon-dark: #5C0016;
  --maroon-deep: #4A0014;
  --cream: #FFF8F0;
  --ivory: #FDF6ED;
  --blush: #F7E3DE;
  --blush-dark: #F3C9C2;
  --white: #FFFFFF;
  --ink: #2B1810;
  --ink-soft: #6B5B52;
  --border: #EDE0CE;
  --success: #3E7A4B;
  --danger: #B3261E;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Misc */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(43, 24, 16, 0.06);
  --shadow-md: 0 8px 24px rgba(43, 24, 16, 0.10);
  --max-width: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 var(--space-2);
  color: var(--maroon-dark);
}

p { margin: 0 0 var(--space-3); }

a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

button, .btn {
  font-family: var(--font-body);
  font-weight: 500;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
button:active, .btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--maroon);
  border: 1.5px solid var(--maroon);
}
.btn-outline:hover { background: rgba(128,0,32,0.06); text-decoration: none; }

/* Pill-shaped action buttons used in the Royal Premium widget cards
   (Section 6): a solid "Open/View/Watch" pill + an outline "Share Link"
   pill, always placed side by side in the same actions row. */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-open {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-open:hover { box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.btn-share {
  background: var(--white);
  color: var(--maroon);
  border: 1.5px solid var(--blush-dark);
}
.btn-share:hover { background: var(--blush); }
.btn-share:disabled { cursor: default; opacity: 0.85; }

/* PUBLIC / PRIVATE / DISABLED badges, reused on the dashboard */
.badge-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge-public { background: var(--blush); color: var(--maroon-dark); border-color: var(--blush-dark); }
.badge-private { background: #FBEAEA; color: #8A2A2A; border-color: #F0C9C9; }
.badge-disabled { background: var(--border); color: var(--ink-soft); }

/* Small dropdown menu, used by the header "Welcome" control */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  z-index: 20;
}
.dropdown-menu button,
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  color: var(--ink);
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}
.dropdown-menu button:hover,
.dropdown-menu a:hover { background: var(--cream); text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Skeleton / loading shimmer, reused across widgets */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #EFE6D8;
  border-radius: var(--radius-sm);
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* Generic state blocks used by utils.js (loading / error / empty) */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}
.state-block .state-icon { font-size: 28px; }
.state-block.state-error { color: var(--danger); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* Full-page centered message (invalid tenant, offline, etc.) */
.fullpage-message {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  text-align: center;
}
.fullpage-message .card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 420px;
  box-shadow: var(--shadow-md);
}
.fullpage-message h2 { margin-bottom: var(--space-2); }
.fullpage-message p { color: var(--ink-soft); margin-bottom: 0; }
