/* =========================
   Riversdale — Light Theme
   ========================= */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Quintessential&family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap');

/* ---------- TOKENS (light only) ---------- */
:root {
  /* Brand / Olive palette */
  --olive-900: #0e2b10;
  --olive-800: #123817;
  --olive-700: #184a1f;
  --olive-600: #1e5a26;
  --olive-500: #276f31;
  --olive-400: #4f8d58;
  --olive-300: #7aa77f;
  --olive-200: #a6c3a6;
  --olive-100: #d5e6d2;

  /* Surfaces & text */
  --bg: #ffffff;            /* page background */
  --text: #111418;          /* main text (near-black) */
  --muted: #4b5563;
  --card: #ffffff;
  --card-border: #d7dde5;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.06);

  /* Links & actions */
  --link: #0b5ed7;
  --primary: var(--olive-500);
  --primary-contrast: #ffffff;

  /* Tables */
  --table-head-bg: #eef3f0;
  --table-row-alt: #f7faf7;
  --table-row-hover: #eaf4ea;

  /* Navbar (keep your lighter green gradient) */
  --nav-bg: linear-gradient(90deg, rgba(3,31,1,0.98), rgba(7,45,8,0.95));
  --nav-brand: #c9d8b4;     /* “Riversdale” text */
  --nav-link: #d9f3c2;      /* links on dark green */
  --nav-link-hover: #ffffff;
  --nav-muted: #dfead9;     /* “Hi, admin” */
  --nav-strong: #ffffff;

  /* Dropdown (on nav) */
  --dropdown-bg: linear-gradient(180deg,#121915 0%, #1b2b23 100%);
  --dropdown-text: #eef7f1;
  --dropdown-hover-bg: rgba(255,255,255,0.10);
  --dropdown-active-bg: rgba(255,255,255,0.16);
  --dropdown-divider: rgba(255,255,255,0.18);

  /* Layout */
  --radius: 10px;
  --nav-height: 70px;
}

/* ---------- GLOBAL LAYOUT (center everything) ---------- */
html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto Flex", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { padding-top: var(--nav-height); }

main, .page-wrap {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 16px;
}

.container { max-width: 1320px; margin: 0 auto; padding-inline: 16px; }
@media (min-width:1600px){ .container { max-width: 1440px; } }

.page-section { margin-block: 28px; }

/* ---------- NAVBAR ---------- */
#mainNav {
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
  min-height: 70px; 
}

#mainNav .navbar-brand,
#mainNav .navbar-toggler {
  display: flex;
  align-items: center;
}

#mainNav.navbar {
  background: var(--nav-bg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  height: var(--nav-height);
  line-height: var(--nav-height);
  z-index: 1040;
}
#mainNav .navbar-brand {
  color: var(--nav-brand) !important;
  font-family: "Quintessential", serif;
  font-size: 1.5rem;
  font-weight: 600;
}
#mainNav .nav-link {
  color: var(--nav-link) !important;
  opacity: .95;
}
#mainNav .nav-link:hover,
#mainNav .nav-link:focus { color: var(--nav-link-hover) !important; opacity: 1; }


#mainNav .right-rail { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
#mainNav .navbar-text.user-greeting { color: var(--nav-muted) !important; font-weight: 500; }
#mainNav .navbar-text.user-greeting strong { color: var(--nav-strong) !important; font-weight: 700; }

#mainNav .navbar-toggler {
  border-width: 2px;
  border-color: #f3fff0;      
  padding: 0.35rem 0.7rem;    
  border-radius: 0.75rem;     
}
#mainNav .navbar-toggler-icon {
  width: 1.6em;
  height: 1.6em;
}

/* NAV DROPDOWN */
#mainNav, #mainNav .navbar-collapse { overflow: visible; }
#mainNav .dropdown-menu {
  z-index: 3000 !important;
  margin-top: 0.35rem;
  min-width: 220px;
  border-radius: 10px;
  background: var(--dropdown-bg);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  padding: 6px 6px;
  color: var(--dropdown-text);
}
#mainNav .dropdown-menu .dropdown-item {
  color: var(--dropdown-text);
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color .12s ease, color .12s ease;
}
#mainNav .dropdown-menu .dropdown-item:hover,
#mainNav .dropdown-menu .dropdown-item:focus {
  background: var(--dropdown-hover-bg);
  color: #fff;
  text-decoration: none;
}
#mainNav .dropdown-menu .dropdown-item.active,
#mainNav .dropdown-menu .dropdown-item:active {
  background: var(--dropdown-active-bg);
  color: #fff;
}
#mainNav .dropdown-menu .dropdown-divider {
  border-top: 1px solid var(--dropdown-divider);
  margin: 6px 0;
}
@media (max-width: 991px){
  #mainNav .dropdown-menu { position: static; box-shadow: none; }
}

@media (min-width: 992px) {   /* adjust breakpoint if you want */
  #mainNav .navbar-toggler {
    display: none;
  }
}
/* Logo in navbar */
.nav-logo-wrapper {
  background: #ffffff;                 /* intentionally white behind logo */
  padding: 2px;
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.nav-logo-img {
  height: 46px;                        /* tweak as you like */
  width: auto;
  display: block;
}

.nav-brand-text {
  line-height: 1;
}

/* Collapsed mobile menu background */
@media (max-width: 991px) {
  #mainNav .navbar-collapse {
    background: var(--nav-bg);
    padding: 0.75rem 1rem 1rem;
    margin-top: 0.5rem;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45);
  }

  #mainNav .nav-link {
    padding-left: 0;                   /* cleaner in stacked menu */
  }

  #mainNav .dropdown-menu {
    background: var(--dropdown-bg);    /* already set, but keeps it solid */
    padding-left: 0;
  }
}


/* Hide any theme toggle elements */
.theme-toggle,
#themeToggle,
.themeLabelLight,
.themeLabelDark { display: none !important; }

/* ---------- CARDS & FORMS ---------- */
.form-card, .card, .live-summary, .invoice-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: .75rem;
  box-shadow: var(--shadow);
  padding: 1rem;
  color: var(--text);
}
.form-card { width: 100%; max-width: 100%; margin: 0 auto 18px; box-sizing: border-box; }
.form-card.auth { max-width: 520px; margin: 0 auto; }
.form-card.signup { max-width: 920px; padding: 22px; }
.form-card.extras { max-width: 760px; padding: 18px; background: var(--card); }

/* Horse card */
.horse-card { border: 1px solid var(--card-border); padding: 12px; margin-bottom: 12px; border-radius: 8px; position: relative; background: var(--card); }
.remove-btn { position: absolute; right: 8px; top: 8px; background: #f66; color: #fff; border: none; padding: 6px 8px; cursor: pointer; border-radius: 6px; }

/* Fieldset / labels / inputs */
fieldset { border:1px solid var(--card-border); border-radius:8px; padding:14px; margin-bottom:16px; background: var(--bg); }
legend { font-family:"Quintessential", serif; font-size:1.05rem; color: var(--text); padding:0 8px; }
label { display:block; margin:8px 0 6px; font-weight:600; color: var(--text); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  width: 100%;
  box-sizing: border-box;
  font-size: 0.95rem;
  margin-bottom: 10px;
  background: var(--card);
  color: var(--text);
}
.form-card.extras input[type="number"] { width: 110px; padding: 6px 8px; }
::placeholder { color: #8a94a6; }

/* Buttons */
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--primary-contrast) !important;
  padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-secondary, .btn-outline-secondary { border-radius: 8px; }

/* ---------- ADMIN TOOLBAR ---------- */
.admin-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  position: sticky;
  top: calc(var(--nav-height) + 8px);
  z-index: 1020;
  background: var(--card);
  border-bottom: 1px solid var(--card-border);
  border-radius: .75rem .75rem 0 0;
  padding-bottom: .5rem;
}
.admin-fields { display: grid; grid-template-columns: minmax(220px, 1fr) 160px 240px; gap: .75rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.admin-actions .btn-group, .admin-actions .btn { white-space: nowrap; }
@media (max-width: 992px){
  .admin-toolbar { grid-template-columns: 1fr; }
  .admin-actions { justify-content: stretch; }
  .admin-actions .btn, .admin-actions .btn-group .btn { flex: 1 1 auto; }
}

/* ---------- TABLES ---------- */
#adminTableContainer {
  border: 1px solid var(--card-border);
  border-radius: .75rem;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: .5rem;
  max-width: 100%;
  margin-inline: auto;
}
.table.admin-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.admin-table thead th {
  position: sticky; top: 0;
  background: var(--table-head-bg);
  z-index: 2;
  border-bottom: 1px solid var(--card-border);
  text-transform: uppercase;
  font-size: .8rem; letter-spacing: .02em;
  color: var(--text);
}
.admin-table td, .admin-table th { vertical-align: middle; padding: .6rem .75rem; border-bottom: 1px solid var(--card-border); color: var(--text); }
.admin-table tbody tr:nth-child(odd) { background: var(--table-row-alt); }
.admin-table tbody tr:hover { background: var(--table-row-hover); }

/* ---------- INVOICE ---------- */
.live-summary { }
.invoice-card { margin-top: 14px; }
.invoice-header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.invoice-table { width:100%; border-collapse: collapse; margin-top:12px; }
.invoice-table th, .invoice-table td { padding: 12px; border: 1px solid var(--card-border); text-align:left; color: var(--text); }
.invoice-total-row td { font-weight:700; background: var(--table-head-bg); color: var(--text); }
.invoice-table td.amount, .invoice-table th.amount { text-align: right; color: var(--text); }

/* ---------- UTILS ---------- */
.small-muted, .muted-small, .text-muted { color: var(--muted) !important; font-size: 0.95rem; }
.text-right { text-align: right; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  :root { --nav-height: 62px; }
  body { padding-top: var(--nav-height); }
  .form-card.auth { max-width: 92%; }
}

.about-section{
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
}

.contact-section{
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
}

/* ===== Event info section ===== */
.event-card {
  padding: 1.5rem;
}

/* Countdown box layout */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  justify-items: center;
  align-items: center;
  margin-top: 0.5rem;
}

.countdown-item {
  background: var(--table-head-bg);
  border-radius: 10px;
  padding: 0.5rem 0.35rem;
  min-width: 70px;
}

.countdown-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* If event already passed */
#eventCountdown.event-passed .countdown-grid {
  opacity: 0.5;
}
#eventCountdown.event-passed::after {
  content: "Event in progress or finished";
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Mobile adjustments */
@media (max-width: 576px) {
  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nav-logo-wrapper {
  background: transparent;  
  box-shadow: none;         
}


#mainNav .btn-outline-primary {
  border-color: #b3ffb3 !important;      
  color: #f7fff7 !important;             
  font-weight: 600;
}

#mainNav .btn-outline-primary:hover,
#mainNav .btn-outline-primary:focus {
  background-color: #b3ffb3 !important;  
  color: #063112 !important;             
  border-color: #b3ffb3 !important;
}

