/* ============================================================
   Daniel Outdoors — style.css
   Aesthetic: Refined outdoor journal. Dark earth tones.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --font-display: 'Josefin Sans', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;

  --bg-dark:      #181c14;
  --bg-header:    rgba(22, 26, 17, 0.92);
  --bg-panel:     #1f2318;
  --border:       rgba(255,255,255,0.08);

  --terra:        #c4622d;
  --terra-light:  #d97c47;
  --terra-dim:    rgba(196,98,45,0.35);
  --moss:         #4a5c3a;
  --sage:         #8aab7a;

  --text-primary: #f0ede6;
  --text-muted:   #a09890;
  --text-dim:     #5a5550;

  --header-h:     54px;
  --footer-h:     38px;
  --panel-width:  380px;
  --radius:       10px;
  --transition:   0.28s ease;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow: hidden;
}

/* ---------- Header ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flame-icon { font-size: 1.3rem; line-height: 1; }

.site-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.header-right {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ---------- Map ---------- */
#map {
  position: fixed;
  top: var(--header-h);
  bottom: var(--footer-h);
  left: 0; right: 0;
  z-index: 1;
}

/* ---------- Campfire pin ---------- */
.campfire-marker {
  display: block;
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
  transition: transform 0.15s ease;
  cursor: pointer;
}

.campfire-marker:hover { transform: scale(1.2); }

/* ---------- Side panel ---------- */
#side-panel {
  position: fixed;
  top: var(--header-h);
  right: calc(-1 * var(--panel-width) - 10px);
  bottom: var(--footer-h);
  width: var(--panel-width);
  z-index: 900;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  transition: right var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#side-panel.open { right: 0; }

#panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18,22,14,0.75);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

#panel-close:hover {
  color: var(--text-primary);
  border-color: var(--terra);
}

#panel-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-dim) transparent;
}

#panel-content::-webkit-scrollbar { width: 4px; }
#panel-content::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 2px; }

/* --- Photo --- */
#panel-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
}

#panel-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

#panel-photo[src=""] { opacity: 0; }

/* --- Panel body --- */
#panel-body {
  padding: 24px 28px 32px;
}

/* Meta row: date + campsite badge side by side */
#panel-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

#panel-date {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
}

/* Campsite type badges */
.campsite-badge {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.6;
}

.badge-dispersed {
  background: rgba(138, 171, 122, 0.18);
  color: var(--sage);
  border: 1px solid rgba(138, 171, 122, 0.35);
}

.badge-campground {
  background: rgba(196, 98, 45, 0.15);
  color: var(--terra-light);
  border: 1px solid var(--terra-dim);
}

.badge-private {
  background: rgba(90, 85, 80, 0.25);
  color: var(--text-dim);
  border: 1px solid rgba(90, 85, 80, 0.4);
}

#panel-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--moss);
}

#panel-notes {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.75;
  color: #c2bdb4;
}

#panel-notes p { margin-bottom: 1em; }
#panel-notes p:last-child { margin-bottom: 0; }

#panel-notes h1, #panel-notes h2, #panel-notes h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 1.3em 0 0.4em;
}

#panel-notes h2 { font-size: 0.95rem; }
#panel-notes h3 { font-size: 0.85rem; color: var(--text-muted); }

#panel-notes ul, #panel-notes ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}

#panel-notes li { margin-bottom: 0.3em; }
#panel-notes strong { color: var(--text-primary); font-weight: 600; }
#panel-notes em { color: var(--sage); font-style: italic; }

#panel-notes blockquote {
  border-left: 3px solid var(--terra);
  padding-left: 14px;
  margin: 1em 0;
  color: var(--text-muted);
  font-style: italic;
}

#panel-notes a {
  color: var(--terra-light);
  text-decoration: none;
  border-bottom: 1px solid var(--terra-dim);
}

#panel-notes a:hover { border-color: var(--terra-light); }

/* ---------- Overlay (mobile) ---------- */
#panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 850;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

/* ---------- Footer ---------- */
#site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

#site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

#site-footer a:hover { color: var(--terra-light); }

.footer-sep { opacity: 0.35; }

/* ---------- No trips message ---------- */
#no-trips-msg {
  position: fixed;
  bottom: calc(var(--footer-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: fadeInUp 0.5s 0.8s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  :root { --panel-width: 100vw; }

  #panel-overlay { display: block; }

  #side-panel.open ~ #panel-overlay,
  #panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  #panel-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    font-size: 18px;
    background: rgba(18,22,14,0.88);
    border-color: var(--moss);
    color: var(--text-primary);
  }
}
