/* =====================================================================
   Lost River B&B — shared design system
   Palette: deep forest (#2F4538), ivory (#FAF6EF), brass (#B08D57),
            clay-red accent for alerts (#A6432E), charcoal text (#2B2B26)
   Type: "Fraunces" (display serif) + "Inter" (body/UI)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --forest: #2F4538;
  --forest-dark: #22332A;
  --ivory: #FAF6EF;
  --paper: #FFFFFF;
  --line: #E4DFD1;
  --brass: #B08D57;
  --brass-dark: #8F6E3E;
  --clay: #A6432E;
  --ink: #2B2B26;
  --ink-soft: #6B6858;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(43,43,38,0.06);
  --shadow-lg: 0 12px 32px rgba(43,43,38,0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--forest-dark);
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

a { color: var(--forest); }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-dark);
  font-weight: 600;
}

/* ---- Layout --------------------------------------------------------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 640px; }

.site-header {
  background: var(--forest);
  color: var(--ivory);
  padding: 18px 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header .brand { font-family: 'Fraunces', serif; font-size: 1.3rem; color: #fff; text-decoration: none; }
.site-header nav a { color: #E7E2D2; text-decoration: none; margin-left: 18px; font-size: 0.88rem; }
.site-header nav a:hover { color: var(--brass); }

/* ---- Mobile/tablet hamburger nav (admin only — see .has-mobile-nav) ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- "More" dropdown (admin nav) — groups less-frequent pages so the
   top-level nav stays a single line as pages get added ---------------- */
.nav-more { position: relative; display: inline-block; margin-left: 18px; }
.nav-more-toggle {
  background: none; border: none; cursor: pointer;
  color: #E7E2D2; font-family: inherit; font-size: 0.88rem; padding: 0;
}
.nav-more-toggle:hover, .nav-more.has-active .nav-more-toggle { color: var(--brass); }
.nav-more-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--forest-dark);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  padding: 6px;
  min-width: 190px;
  z-index: 20;
  list-style: none; /* this is a real <ul> now (Bootstrap dropdown), not the <div> it originally was */
  margin: 10px 0 0 0;
}
.nav-more.open .nav-more-panel { display: block; }
.nav-more-panel a {
  display: block;
  margin-left: 0 !important;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-more-panel a:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 900px) {
  .site-header.has-mobile-nav .container { flex-wrap: wrap; }
  .site-header.has-mobile-nav .nav-toggle { display: flex; }
  .site-header.has-mobile-nav nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  .site-header.has-mobile-nav nav.open { display: flex; }
  .site-header.has-mobile-nav nav a {
    margin-left: 0;
    padding: 12px 10px;
    border-radius: 6px;
    font-size: 0.95rem;
  }
  .site-header.has-mobile-nav nav a:hover,
  .site-header.has-mobile-nav nav a:active { background: rgba(255,255,255,0.08); }

  /* On mobile the whole nav is already a vertical stack, so flatten the
     "More" panel inline instead of requiring an extra tap to reveal it. */
  .site-header.has-mobile-nav .nav-more { margin-left: 0; width: 100%; }
  .site-header.has-mobile-nav .nav-more-toggle { display: none; }
  .site-header.has-mobile-nav .nav-more-panel {
    display: block;
    position: static;
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-top: 0;
  }
  /* The dropdown-item color/hover rules in bootstrap-bridge.css are tuned
     for the desktop dropdown (dark text on a light panel) — need higher
     specificity here to restore the light/cream color these links use
     everywhere else in the mobile nav (dark green background). */
  .site-header.has-mobile-nav .nav-more-panel .dropdown-item {
    color: #E7E2D2;
    padding: 12px 10px;
    font-size: 0.95rem;
  }
  .site-header.has-mobile-nav .nav-more-panel .dropdown-item:hover,
  .site-header.has-mobile-nav .nav-more-panel .dropdown-item:active {
    background: rgba(255,255,255,0.08);
    color: #E7E2D2;
  }
}

.page-hero {
  padding: 48px 0 32px;
  text-align: center;
}
.page-hero p.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

.section { padding: 32px 0; }

/* ---- Cards ------------------------------------------------------------ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

.room-grid, .item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.room-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.room-card img { width: 100%; height: 170px; object-fit: cover; display: block; background: var(--line); }
.room-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

/* ---- Photo gallery + lightbox (booking page) ---------------------------- */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.gallery-thumb {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--line);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.gallery-thumb:hover { opacity: 0.85; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,18,14,0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.8rem; }
}
.room-card .price { font-family: 'Fraunces', serif; font-size: 1.3rem; color: var(--forest-dark); }
.room-card .price small { font-family: 'Inter', sans-serif; font-size: 0.75rem; color: var(--ink-soft); font-weight: 400; }

/* ---- Forms ------------------------------------------------------------ */
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--forest-dark); }
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(176,141,87,0.18);
}
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 6px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-dark); }
.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-dark); }
.btn-outline { background: transparent; border: 1px solid var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: #fff; }
.btn-danger { background: var(--clay); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- Toggle switch (admin on/off controls) ----------------------------- */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track {
  position: absolute; inset: 0; background: #D8D2BF; border-radius: 999px; cursor: pointer; transition: background 0.15s;
}
.toggle .track::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle input:checked + .track { background: var(--forest); }
.toggle input:checked + .track::before { transform: translateX(20px); }

/* ---- Badges / status pills ---------------------------------------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; }
.badge-green { background: #E4EEE1; color: #3C5C36; }
.badge-amber { background: #F5E9D3; color: #8A6416; }
.badge-red { background: #F3DEDA; color: var(--clay); }
.badge-gray { background: #EDEAE0; color: var(--ink-soft); }

/* ---- Tables (admin) ------------------------------------------------------ */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
tr:hover td { background: #FBFAF6; }

/* ---- Utility -------------------------------------------------------------- */
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.muted { color: var(--ink-soft); }
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mt-32{margin-top:32px;}
.mb-0{margin-bottom:0;}
.text-center { text-align: center; }
.divider { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.alert { padding: 12px 16px; border-radius: 6px; font-size: 0.9rem; margin-bottom: 16px; }
.alert-success { background: #E4EEE1; color: #3C5C36; }
.alert-error { background: #F3DEDA; color: var(--clay); }

.stepper-tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.stepper-tabs button {
  flex: 1; min-width: 120px; padding: 10px 12px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--ink-soft);
}
.stepper-tabs button.active { background: var(--forest); color: #fff; border-color: var(--forest); }

.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty-control button { background: var(--ivory); border: none; width: 30px; height: 30px; cursor: pointer; font-size: 1rem; }
.qty-control span { width: 32px; text-align: center; font-weight: 600; }

/* ---- Rich text editor (admin email composer / templates) --------------- */
.rte-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--paper); }
.rte-toolbar {
  display: flex; align-items: center; gap: 2px; padding: 6px; background: var(--ivory);
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.rte-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; background: transparent; border-radius: 5px;
  cursor: pointer; color: var(--forest-dark); font-size: 0.95rem;
}
.rte-btn:hover { background: rgba(47,69,56,0.08); }
.rte-btn-active { background: var(--forest); color: #fff; }
.rte-btn-active:hover { background: var(--forest-dark); }
.rte-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.rte-editable {
  min-height: 180px; padding: 12px 14px; font-family: inherit; font-size: 0.95rem;
  color: var(--ink); line-height: 1.5; outline: none;
}
.rte-editable:empty::before { content: attr(data-placeholder); color: var(--ink-soft); }
.rte-editable a { color: var(--forest); }
textarea.rte-source {
  width: 100%; min-height: 180px; border: none; border-radius: 0; font-family: 'Courier New', monospace;
  font-size: 0.85rem; padding: 12px 14px; resize: vertical;
}
textarea.rte-source:focus { outline: none; box-shadow: none; }

.tag-picker { width: auto; max-width: 220px; padding: 6px 8px; font-size: 0.8rem; border-color: var(--line); }

footer.site-footer { padding: 28px 0; text-align: center; color: var(--ink-soft); font-size: 0.82rem; }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .site-header nav a { margin-left: 12px; font-size: 0.85rem; }
}
