/* ========== Custom Font: Aileron ========== */
@font-face {
  font-family: 'Aileron';
  src: url('/static/fonts/Aileron.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ========== Custom Font: Alex Brush ========== */
@font-face {
  font-family: 'AlexBrush';
  src: url('/static/fonts/AlexBrush.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ========== Custom Font: Penna ========== */
@font-face {
  font-family: 'Penna';
  src: url('/static/fonts/penna.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ========== Custom Font: Audrey ========== */
@font-face {
  font-family: 'Audrey';
  src: url('/static/fonts/Audrey.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ========== Custom Font: Royal Wedding ========== */
@font-face {
  font-family: 'RoyalWedding';
  src: url('/static/fonts/RoyalWedding.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ========== Custom Font: Poppins ========== */
@font-face {
  font-family: 'Poppins';
  src: url('/static/fonts/Poppins.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ========== Custom Font: Rosabelia ========== */
@font-face {
  font-family: 'Rosabelia';
  src: url('/static/fonts/Rosabelia.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LTPerfume';
  src: url('/static/fonts/LTPerfume.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FlorilaneCardillac';
  src: url('/static/fonts/FlorilaneCardillac.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-primary: #9EB8A3;       /* Deep Leaf Green */
  --c-secondary: #768D7A;     /* Soft Sage */
  --c-accent: #D4C2A8;        /* Warm Wood Beige */
  --c-olive: #7D7F4A;         /* Olive Green */
  --c-text: #3E3E3E;          /* Dark Text */
  --c-bg: #FFFDFB;            /* Off-White Background */
  --c-fallback-bg: #D8E2D1;   /* Pale Sage Green Fallback */
  --c-gradient-start: #768D7A;
  --c-gradient-end: #9EB8A3;
}

/* Reset & box-sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base typography + background */
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--c-text);
  background-color: var(--c-fallback-bg);  /* Pale sage green fallback */
  background-image: url('/static/images/background.png');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  text-align: center;
  padding-bottom: 2rem;
}

/* Header with gradient */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--c-gradient-start), var(--c-gradient-end));
  color: #ffffff;
}
.site-header .logo {
  font-family: 'FlorilaneCardillac', cursive;
  font-size: 2rem;
}

/* Mobile burger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.nav-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
  border-radius: 6px;
}
/* Utility visibility helpers for responsive header controls */
.mobile-only { display: none; }
.desktop-only { display: inline-block; }

/* Navigation menu */
.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.site-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  transition: background 0.3s ease;
}
.site-nav a.active,
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Header actions (logout) */
.header-actions {
  margin-left: 2rem;
}
.action-btn.logout-btn {
  /* Logout uses same action-btn styles defined below */
}

/* Primary action button */
.action-btn {
  background-color: var(--c-accent);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin: 0;
}
.action-btn:hover {
  background-color: var(--c-primary);
}

/* Intro section */
.intro {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-size: 1rem;
}

/* Footer styling */
.site-footer {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: #ffffff;
}

/* Responsive tweaks */
@media (min-width: 768px) {
  .site-header .logo {
    font-size: 2.5rem;
  }
  .intro {
    font-size: 1.1rem;
  }
}

/* ========== Mobile Header / Burger Nav ========== */
@media (max-width: 768px) {
  /* Use a 2-row grid: top row header controls, second row dropdown nav */
  .site-header {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: center;
    padding: 1rem 1rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
  }

  .site-header .logo {
    justify-self: center;
    text-align: center;
    margin: 0;
  }

  .header-actions {
    justify-self: end;
    margin-left: 0;
  }

  /* Show dropdown logout, hide header logout */
  .desktop-only { display: none; }
  .mobile-only { display: block; }

  .site-nav .nav-logout {
    margin-top: 0.5rem;
  }

  .site-nav .nav-logout .action-btn {
    width: 100%;
    text-align: center;
  }

  /* Hide nav by default on mobile */
  .site-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.75rem;
  }

  /* Show nav when header has nav-open */
  .site-header.nav-open .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
  }

  .site-nav a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
  }
}

/* ---------- Login Card Styles ---------- */
.content-container {
  max-width: 90%;
  margin: 2rem auto;
}
.login-card {
  background-color: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  margin: 3rem auto;
  text-align: center;
}
.login-card h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--c-text);
}
.login-card .login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.login-card .login-form input {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.login-card .login-form button {
  padding: 0.75rem;
  font-size: 1rem;
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.login-card .login-form button:hover {
  background: var(--c-primary);
}

/* ========== RSVP Page Styles ========== */
/* Two-column responsive grid for guest cards */
#guests-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 2rem auto;
  align-items: start;
}
.guest-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
  height: auto;
}
/* Guest name styling */
.guest-card .guest-name {
  display: block;              /* ensure block layout for margin */
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-primary);
  text-align: center;
}

/* Info message shown at bottom of a guest card (from SeaTable "Info" column) */
.guest-info {
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  text-align: center;
  line-height: 1.4;

  /* subtle highlight */
  background: rgba(212, 194, 168, 0.22); /* derived from --c-accent */
  border: 1px solid rgba(118, 141, 122, 0.25); /* derived from --c-secondary */
}

.guest-info::before {
  content: "Info";
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-secondary);
}

.guest-info {
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-secondary);
}

.form-row {
  display: flex;
  align-items: center;
  gap: 0rem;         /* reduced horizontal gap */
  margin-bottom: 0rem; /* reduced vertical spacing */
}
.form-row label {
  flex: 0 0 140px;
  font-weight: 500;
  color: var(--c-text);
  text-align: left;      /* rleft-align label text */
}
.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
  min-width: 0;          /* allow shrinking inside flex */
  width: 100%;           /* fill available space */
  max-width: 100%;       /* prevent overflow */
  box-sizing: border-box;/* include padding/border in width */
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}
/* Ensure placeholder text renders consistently across browsers */
.form-row input::placeholder,
.form-row textarea::placeholder {
  font-family: inherit;
  font-size: inherit;
}

/* Safari-specific placeholder selector */
.form-row input::-webkit-input-placeholder,
.form-row textarea::-webkit-input-placeholder {
  font-family: inherit;
  font-size: inherit;
}

#action-buttons {
  display: flex;
  justify-content: center; /* center buttons horizontally */
  gap: 1rem;
  margin-top: 1.5rem;
}
.cancel-btn {
  /* no extra styling; inherits action-btn */
}

/* ========== Page Card Wrapper ========== */
.page-card {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 1000px;
  margin: 2rem auto;
}

/* ========== Disabled State Styles ========== */
/* Dim entire card when it has the disabled-card class */
.disabled-card {
  opacity: 0.6;
}

/* Grey out any disabled form control */
select:disabled,
input:disabled,
textarea:disabled {
  background-color: #f5f5f5;
  color: #888888;
  cursor: not-allowed;
}

/* ========== RSVP Mobile Floating Action Bar ========== */
@media (max-width: 768px) {
  /* Make room so content isn't hidden behind the fixed buttons */
  .rsvp-page .rsvp-container {
    padding-bottom: 110px; /* tweak if your button bar height changes */
  }

  .rsvp-page #action-buttons {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;

    padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 253, 251, 0.96); /* matches your off-white vibe */
    backdrop-filter: blur(8px);

    border-top: 1px solid rgba(118, 141, 122, 0.2);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.08);

    z-index: 200;
  }

  /* Make buttons behave nicely in a row on small screens */
  .rsvp-page #action-buttons .action-btn {
    flex: 1 1 0;
    max-width: 180px;
  }
}

/* RSVP feedback message (save/cancel status) */
.feedback-message {
  max-width: 800px;
  margin: 1rem auto 0.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;

  /* Ensure it stands out against the background image */
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(118, 141, 122, 0.25);

  /* Layer above cards/background */
  position: relative;
  z-index: 50;
}

.feedback-message:empty {
  display: none;
}

.feedback-message.feedback-success {
  color: var(--c-secondary);
}

.feedback-message.feedback-error {
  color: #8b2f2f;
  border-color: rgba(139, 47, 47, 0.25);
}

@media (max-width: 768px) {
  .feedback-message {
    max-width: 92%;
    margin-top: 0.75rem;
    font-size: 1rem;
  }
}

/* Hotel images – max width and centered */

/* Hotel features list styling */
.hotel-card .hotel-features {
  list-style-type: disc;
  list-style-position: inside;
  margin: 0.5rem 0 1.5rem 1.25rem; /* top/right/bottom/left */
  padding: 0;                      /* reset default padding */
  text-align: left;
  max-width: 100%;
}

.hotel-image {
  width: 100%;
  max-width: 240px;      /* cap width */
  height: auto;          /* maintain aspect ratio */
  display: block;        /* block for margin auto */
  margin: 0 auto 0.75rem; /* center + space below */
  border-radius: 4px;
}

/* ========== Hotel Grid & Card Layout ========== */
.hotels {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.hotel-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  max-width: 320px;
  flex: 1 1 320px;
}

/* ensure features list sits inside card padding */
.hotel-card .hotel-features {
  margin-left: 0; /* let list-style-position handle indentation */
}

/* ========== Home Details Styling ========== */
.home-who {
  font-family: 'FlorilaneCardillac', cursive;
  font-size: 5rem;
  line-height: 1.1;
  color: var(--c-secondary);
  margin-bottom: 0.5rem;
}

.home-cta {
  margin-top: 2rem;
}

.home-more {
  margin-top: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
  line-height: 1.6;
}

.home-more a {
  color: var(--c-secondary);
  font-weight: 600;
  text-decoration: underline;
}

.details-card {
  margin: 1.6rem auto 1.6rem;
  text-align: center;
  max-width: 720px;
}

/* Weekday + divider lines */
.details-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.6rem auto;
  letter-spacing: 0.12em;
}

.details-line::before,
.details-line::after {
  content: "";
  height: 1px;
  background: rgba(0, 0, 0, 0.14);
  flex: 1;
  max-width: 220px;
}

.details-text {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

/* Date container holds weekday + main date */
.details-date {
  font-family: 'WeddingDisplay', serif;
  margin-top: 0.75rem;
}

.details-date-main {
  font-family: 'WeddingDisplay', serif;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 1.9rem;
  color: rgba(0, 0, 0, 0.75);
}

.details-big-day {
  font-size: inherit;
  font-weight: inherit;
  color: var(--c-secondary);
  letter-spacing: inherit;
}

.details-monthyear {
  font-weight: 500;
}

/* Time line */
.details-time {
  margin-top: 0.5rem;
  font-family: 'WeddingDisplay', serif;
}

/* Venue block */
.details-venue {
  margin-top: 1.6rem;
  font-family: 'WeddingDisplay', serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.60);
}

.details-venue-line1 {
  font-size: 1.3rem;
}

.details-venue-line2 {
  margin-top: 0.4rem;
  font-size: 1.15rem;
}

.details-actions {
  margin-top: 1rem;
}

.details-map {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  color: var(--c-secondary);
  border-bottom: 1px solid rgba(118, 141, 122, 0.7);
  padding-bottom: 2px;
}

.details-map:hover {
  opacity: 0.8;
}

@media (max-width: 520px) {
  .details-line::before,
  .details-line::after {
    max-width: 90px;
  }
  .details-date-main {
    font-size: 1.5rem;
  }
  .details-venue-line1 {
    font-size: 1.15rem;
  }
  .details-venue-line2 {
    font-size: 1rem;
  }
}


/* ========== Details Page Styling ========== */
.page-intro {
  margin: 0.5rem auto 2rem;
  max-width: 720px;
}

.details-section {
  margin-top: 3rem;
}

.details-section:first-of-type {
  margin-top: 2.25rem;
}

.details-section h2 {
  margin: 0 0 0.9rem;
}

.details-section p {
  margin: 0 auto 1.2rem;
  max-width: 720px;
}

/* Remove bullets + tighten layout for lists on Details page */
.details-list {
  list-style: none;
  padding-left: 0;
  margin: 0 auto;
  max-width: 720px;
}

.details-list li {
  margin: 0.65rem 0;
}

/* Extra breathing room between major sections */
.details-section + .details-section {
  margin-top: 3.25rem;
}

/* ========== Details Countdown (PQINA Flip) ========== */
.wedding-countdown {
  margin: 1.25rem auto 2.25rem;
  text-align: center;
}

/* Uses the same font/colour as Home "who" (home-who class is applied in details.ejs)
   This rule just tunes the size on the Details page. */
.wedding-countdown-title.home-who {
  font-size: 5.75rem;
  margin-bottom: 1rem;
}

.wedding-countdown-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.wedding-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 110px;
  position: relative;
}

.wedding-countdown-label {
  font-family: 'WeddingDisplay', serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
  color: rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 2;
  margin-top: -0.25rem;
}

/* Make the flip cards bigger (avoid transform scaling which can misalign flip halves) */
.wedding-countdown .tick {
  font-size: 1.95em;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

/* Countdown flip tile colour (olive)
   NOTE: don't paint the FRONT/TOP overlay layers, or they can cover the top-half digit. */
.wedding-countdown .tick-flip-panel,
.wedding-countdown .tick-flip,
.wedding-countdown .tick-flip-panel-back,
.wedding-countdown .tick-flip-panel-bottom,
.wedding-countdown .tick-flip-card-back,
.wedding-countdown .tick-flip-back,
.wedding-countdown .tick-flip-panel-front,
.wedding-countdown .tick-flip-panel-top,
.wedding-countdown .tick-flip-card-front,
.wedding-countdown .tick-flip-front {
  background-color: var(--c-olive) !important;
}

@media (max-width: 520px) {
  .wedding-countdown-title.home-who {
    font-size: 4rem;
  }

  .wedding-countdown-grid {
    gap: 0.6rem;
  }

  .wedding-countdown .tick {
    font-size: 1.6em;
    margin-bottom: 1rem;
  }
}

/* ========== Gifts QR Styling ========== */
.monzo-qr-wrapper {
  text-align: center;
  margin-top: 1.5rem;
}

.monzo-qr {
  max-width: 240px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.monzo-qr:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}