/* ========================================
   Base / Variables
   ======================================== */
:root {
  --brand: #7a9b6d;      /* gentle autumn green */
  --brand-dark: #5b7a52;
  --card-bg: #ffffff;
  --text: #5c4033;
  --bg: #FFFFF0;
  --accent: #b5651d;     /* warm autumn brown */
  --accent-dark: #8f4a0e;
  --muted: #666;
  --border: #ddd;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  text-align: center;
}

/* Smooth anchor scrolling + sticky header offset */
html { scroll-behavior: smooth; }
section { scroll-margin-top: 70px; }

/* ========================================
   Typography
   ======================================== */
h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3rem); margin: 0.3em 0; }
h2 { font-size: clamp(1.4rem, 1.0rem + 1.2vw, 2rem); margin: 0.3em 0; color: #b5651d; }
h3 { font-size: clamp(1.2rem, 0.9rem + 0.8vw, 1.6rem); margin: 0.25em 0; }

/* ========================================
   Header / Banner
   ======================================== */
header {
  background-color: #c0aea7;
  color: white;
  padding: 20px 0;
  font-size: 1.5em;
}

.banner {
  width: 100%;
  max-width: 2000px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: cover;
}

/* Responsive banner switch */
@media (max-width: 600px) {
  .banner {
    content: url('images/wedding_banner_mobile.png');
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
  }
}

/* ========================================
   Global Section Layout
   ======================================== */
section {
  padding: 40px 20px;
  margin: 20px auto;
  max-width: 800px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Optional: neutralise global card look and apply .card-section where needed
   Uncomment to use:

section { padding: 40px 20px; margin: 20px auto; max-width: 800px; background: transparent; box-shadow: none; }
.card-section { background: #fff; border-radius: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.1); }

*/

/* ========================================
   Utilities / Common Components
   ======================================== */
/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.2em;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}
.btn:hover { background-color: var(--accent-dark); }

/* Small input (email) */
#email {
  display: block;
  margin: 10px auto;
  width: 50%;
  max-width: 300px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  text-align: center;
}

/* Countdown */
#countdown {
  font-size: 1.5em;
  font-weight: bold;
  color: #a94442;
}

/* Schedule alignment */
.schedule {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Footer */
footer {
  background-color: #c0aea7;
  color: white;
  padding: 10px 0;
  font-size: 0.9em;
}

/* Responsive Map */
.map-container {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 */
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.map-container iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

/* ========================================
   Site Header (Sticky + Responsive Menu)
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-family: 'Arial', sans-serif;
  font-size: 0.95rem;
}
.admin-greeting { margin-right: 15px; font-weight: bold; color: var(--text); }

.site-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px;
  flex-wrap: nowrap;
}
.site-header .left,
.site-header .right {
  display: flex;
  gap: 10px;
}
.site-header a {
  text-decoration: none;
  color: var(--text);
  font-weight: bold;
  white-space: nowrap;
}
.site-header a:hover { text-decoration: underline; }

.site-header .menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

/* Mobile menu (floating at small screens) */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 10px 20px;
  background: #f9f9f9;
  border-top: 1px solid #ddd;
}
.mobile-menu a { padding: 8px 0; }

@media (max-width: 768px) {
  .site-header .left { display: none; }
  .site-header .right {
    display: flex; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  .site-header .menu-toggle { display: block; }

  .mobile-menu {
    display: none;
    position: fixed;
    top: 60px; right: 12px;
    width: 240px;
    background: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1001;
    flex-direction: column;
    padding: 1em;
    text-align: left;
    border: 1px solid #ddd;
    border-radius: 8px;
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a {
    padding: 10px 0; font-size: 1.1em; text-decoration: none; color: var(--text); font-weight: bold;
  }
}

/* ========================================
   Login / Forms / RSVP
   ======================================== */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 2rem 1rem;
}

/* RSVP form */
#rsvp-form {
  max-width: 500px;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.rsvp-form { display: flex; flex-direction: column; align-items: center; }
.rsvp-input {
  width: 100%;
  padding: 10px; margin: 10px 0;
  border: 1px solid #ccc; border-radius: 5px; font-size: 1em;
}
.rsvp-button {
  background-color: var(--accent);
  color: white; padding: 10px 20px; border: none; border-radius: 5px;
  cursor: pointer; font-size: 1.2em; transition: background-color 0.3s;
}
.rsvp-button:hover { background-color: var(--accent-dark); }

/* RSVP details page */
.rsvp-details {
  max-width: 600px; margin: 30px auto; padding: 20px;
  background: #fff; border-radius: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.rsvp-details h2 { color: #b5651d; }
.rsvp-details form { display: flex; flex-direction: column; }
.rsvp-details label { font-weight: bold; margin-top: 10px; }
.rsvp-details input[type="radio"],
.rsvp-details input[type="text"] { margin: 5px 0; }
.rsvp-details hr { margin: 15px 0; border: none; height: 1px; background: #ccc; }
.rsvp-submit {
  background-color: var(--accent); color: white; padding: 10px 20px;
  border: none; border-radius: 5px; cursor: pointer; font-size: 1.2em; transition: background-color 0.3s; margin-top: 10px;
}
.rsvp-submit:hover { background-color: var(--accent-dark); }

/* Download CSV button */
.download-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4CAF50; color: white; text-decoration: none;
  border-radius: 5px; font-size: 1.2em; transition: background-color 0.3s;
  margin-bottom: 20px;
}
.download-button:hover { background-color: #45a049; }

/* WhatsApp community section */
#whatsapp-community {
  padding: 40px 20px; margin: 20px auto; max-width: 800px;
  background: white; border-radius: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.1);
  text-align: center;
}

/* ========================================
   Upload Form
   ======================================== */
.upload-form-wrapper {
  max-width: 550px; margin: 40px auto; background: #fff; padding: 30px;
  border-radius: 15px; box-shadow: 0 8px 20px rgba(0,0,0,0.07); text-align: center;
}
.upload-heading { font-size: 1.8em; color: #a36d4f; margin-bottom: 10px; }
.upload-subtext { font-size: 0.95em; margin-bottom: 25px; color: #666; }
.upload-form { display: flex; flex-direction: column; gap: 18px; }

.form-label { text-align: left; font-weight: 600; margin-bottom: 5px; color: #444; }
.form-input, .form-file {
  padding: 10px 14px; font-size: 1em; border: 1px solid #ccc; border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); transition: border 0.3s ease; width: 100%;
}
.form-input:focus, .form-file:focus { border-color: #a36d4f; outline: none; }

.styled-button {
  background-color: #a36d4f; color: white; padding: 12px; border: none; border-radius: 10px;
  font-size: 1em; cursor: pointer; transition: background 0.3s ease;
}
.styled-button:hover { background-color: #915b40; }

.progress-wrapper { margin-bottom: 20px; }
.progress-text { font-size: 0.95em; margin-bottom: 8px; }
.progress-bar-container { background: #eee; border-radius: 10px; overflow: hidden; height: 20px; }
.progress-bar-fill { height: 100%; width: 0%; background: #a36d4f; transition: width 0.2s ease; }

.upload-form input,
.upload-form button {
  width: 100%; box-sizing: border-box; margin: 0;
}

.form-file {
  padding: 10px 14px; font-size: 1em; border: 1px solid #ccc; border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); background-color: white; cursor: pointer; appearance: none;
}

/* Mobile tweaks for upload form */
@media (max-width: 500px) {
  .upload-form-wrapper { padding: 20px; margin: 20px 10px; }
  .upload-heading { font-size: 1.2em; }
  .upload-form-wrapper button { font-size: 1em; }
}

/* ========================================
   Honeymoon / Gifts Section
   ======================================== */
.gift-section {
  padding: clamp(1.5rem, 2vw + 1rem, 3rem) 1rem;
}
.gift-card {
  max-width: 900px; margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, #000 8%, transparent);
  border-radius: 20px;
  padding: clamp(1.25rem, 2vw + 1rem, 2rem);
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}
.gift-title {
  margin: 0 0 .5rem;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem);
  line-height: 1.2;
}
.gift-lede {
  margin: 0 0 1.25rem;
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  color: color-mix(in srgb, #000 70%, #fff 30%);
}
.gift-actions {
  display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem;
}
.gift-section .btn {
  appearance: none; border: none; cursor: pointer;
  padding: .75rem 1rem; border-radius: 999px; font-weight: 600; line-height: 1;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .06s ease, box-shadow .2s ease, background-color .2s ease;
}
/* Primary */
.gift-section .gift-btn {
  background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.gift-section .gift-btn:hover { transform: translateY(-1px); }
/* Ghost */
.gift-section .btn-ghost {
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  color: color-mix(in srgb, #000 80%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
}
.gift-section .btn-ghost:hover { transform: translateY(-1px); }

/* Hidden bank panel */
.gift-bank {
  margin-top: .25rem; border-top: 1px dashed color-mix(in srgb, #000 20%, transparent); padding-top: 1rem;
}
.bank-rows {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: .5rem .75rem; align-items: center;
}
.bank-row { display: contents; }
.bank-label { font-weight: 600; color: color-mix(in srgb, #000 75%, #fff); }
.bank-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: color-mix(in srgb, #000 4%, #fff);
  border: 1px solid color-mix(in srgb, #000 10%, transparent);
  padding: .4rem .55rem; border-radius: .55rem; user-select: all;
}
.copy-btn {
  padding: .45rem .7rem; border: 1px solid color-mix(in srgb, #000 14%, transparent);
  border-radius: .55rem; background: #fff; cursor: pointer; font-size: .95rem;
}
.copy-btn:hover { background: color-mix(in srgb, #000 6%, #fff); }
.bank-note { margin-top: .75rem; font-size: .975rem; color: color-mix(in srgb, #000 65%, #fff); }

/* Mobile tweaks */
@media (max-width: 640px) {
  .bank-rows { grid-template-columns: 1fr; }
  .copy-btn { justify-self: start; }
}

/* Optional: <details> / <summary> version styling (if you switch from JS toggle)
details.gift-details {
  margin-top: .25rem; border-top: 1px dashed color-mix(in srgb, #000 20%, transparent); padding-top: 1rem;
}
details.gift-details > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  font-weight: 600;
}
details.gift-details > summary::-webkit-details-marker { display: none; }
*/

/* Gift section bank details toggle */
details.gift-details {
  margin-top: 1rem;
  border-top: 1px dashed color-mix(in srgb, #000 20%, transparent);
  padding-top: 1rem;
  text-align: left;
}

details.gift-details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  font-weight: 600;
  margin-bottom: 1rem;
}

details.gift-details > summary::-webkit-details-marker {
  display: none;
}

/* Bank details rows */
.bank-rows {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem 1rem;
  margin-top: .5rem;
}

.bank-row { display: contents; }

.bank-label {
  font-weight: 600;
  color: color-mix(in srgb, #000 75%, #fff);
}

.bank-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: color-mix(in srgb, #000 4%, #fff);
  border: 1px solid color-mix(in srgb, #000 10%, transparent);
  padding: .4rem .55rem;
  border-radius: .55rem;
}

.bank-note {
  margin-top: .75rem;
  font-size: .975rem;
  color: color-mix(in srgb, #000 65%, #fff);
}

/* Centered layout for bank details in gifts section */
#gifts .bank-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  margin-top: 1rem;
}

#gifts .bank-row {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#gifts .bank-label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

#gifts .bank-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: color-mix(in srgb, #000 4%, #fff);
  border: 1px solid color-mix(in srgb, #000 10%, transparent);
  padding: .4rem .8rem;
  border-radius: .55rem;
  min-width: 160px;
  text-align: center;
}

#gifts .bank-note {
  text-align: center;
}

#gifts details.gift-details {
  display: flex;
  flex-direction: column;
  align-items: center; /* centres the summary button */
}

#gifts details.gift-details > summary {
  margin: 0 auto 1rem; /* ensures it sits centrally */
}

/* Gifts: summary looks like a soft ghost button; centred */
#gifts details.gift-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
  text-align: center;
}

#gifts details.gift-details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  margin: 0 auto 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  font-weight: 600;
}

/* Hide default marker in some browsers */
#gifts details.gift-details > summary::-webkit-details-marker { display: none; }

/* Pay block + note centred */
#gifts .gift-pay { text-align: center; }
#gifts .bank-note { text-align: center; }


/* ========================================
   Misc
   ======================================== */
.login-wrapper a, .rsvp-details a, .upload-form-wrapper a { color: var(--accent); }
.login-wrapper a:hover, .rsvp-details a:hover, .upload-form-wrapper a:hover { color: var(--accent-dark); }


/* Decorative divider for sections */
.divider {
  position: relative;
  margin: 2rem auto 1.5rem;
  height: 1px;
  width: 80%;
  background: color-mix(in srgb, #000 15%, #fff);
}

.divider::after {
  content: "❤️"; /* swap for 🍂, 🌸, ✨ if preferred */
  position: absolute;
  top: -0.85em;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  padding: 0 0.6em;
  font-size: 1.4em;
}
