/* SeekATree — minimal, no framework. Shared by the public site and admin. */

:root {
    --ink: #1f2a22;
    --muted: #5f6f64;
    --line: #d9e2dc;
    --accent: #2f6b3a;
    --accent-dark: #245530;
    --accent-soft: #e7f3e9;
    --bg: #f6f8f6;
    --card: #ffffff;
    --danger: #b3261e;
    --danger-soft: #fbe4e2;
    --warn-soft: #fdf3d7;
    --warn: #7a5d0a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}

a { color: var(--accent); }
img { max-width: 100%; display: block; }

/* Banner */
.banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--card);
    border-bottom: 1px solid var(--line);
}

.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.brand-large { font-size: 1.6rem; text-align: center; margin-bottom: 0.75rem; display: block; }

.env-badge {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.topnav { display: flex; gap: 0.25rem; }
.topnav a { color: var(--ink); text-decoration: none; padding: 0.25rem 0.6rem; border-radius: 4px; }
.topnav a:hover { background: var(--bg); }

.banner-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.whoami { color: var(--muted); font-size: 0.9rem; }

.link-button {
    background: none; border: none; color: var(--accent); cursor: pointer;
    font: inherit; padding: 0; text-decoration: underline;
}
.link-button.danger { color: var(--danger); }
button[type="submit"].link-button { background: none; color: var(--accent); padding: 0; border-radius: 0; }
button[type="submit"].link-button:hover { background: none; text-decoration: none; }
button[type="submit"].link-button.danger { color: var(--danger); }

.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 2rem 1rem; }

/* Layout */
.content { max-width: 72rem; margin: 1.5rem auto; padding: 0 1.25rem; }
.is-public .content { max-width: 66rem; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.6rem; }
h3 { font-size: 1rem; margin: 1.2rem 0 0.5rem; }

.page-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; flex: 1; }
.page-actions { display: flex; gap: 1rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.is-public .two-col { grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); }
@media (max-width: 800px) { .two-col, .is-public .two-col { grid-template-columns: 1fr; } }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.empty { color: var(--muted); padding: 2rem; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; }

/* Auth card */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2rem; width: 22rem; }
.login-title { text-align: center; }

/* Flash */
.flash { padding: 0.6rem 0.9rem; border-radius: 5px; margin-bottom: 1rem; }
.flash ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.flash-success { background: var(--accent-soft); color: #1d5b33; }
.flash-error { background: var(--danger-soft); color: var(--danger); }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 0.9rem; }

label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
label.inline { flex-direction: row; align-items: center; gap: 0.4rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="date"], input[type="time"], input[type="url"], textarea, select {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 5px;
    font: inherit;
    background: #fff;
    width: 100%;
}
input.narrow { width: 6rem; }
textarea { min-height: 5rem; resize: vertical; }

.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.82rem; }
.row-error { outline: 2px solid var(--danger-soft); }

button[type="submit"], .button {
    background: var(--accent); color: #fff; border: none; border-radius: 5px;
    padding: 0.5rem 1rem; font: inherit; cursor: pointer; text-decoration: none; display: inline-block;
}
button[type="submit"]:hover, .button:hover { background: var(--accent-dark); }
.button-secondary, button.button-secondary { background: var(--card); color: var(--accent); border: 1px solid var(--accent); }
.button-secondary:hover, button.button-secondary:hover { background: var(--accent-soft); }
.button-danger, button.button-danger { background: var(--danger); }
.button-danger:hover, button.button-danger:hover { background: #8f1d17; }
.button-block { width: 100%; }

.filters { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input[type="search"] { flex: 1; min-width: 14rem; width: auto; }
.filters select { width: auto; }

fieldset { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 1rem 1.25rem 1.25rem; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 0.8rem; }
legend { font-weight: 700; padding: 0 0.4rem; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 0.8rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.dest-form { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .dest-form { grid-template-columns: 1fr; } }
.form-side { position: sticky; top: 1rem; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.8rem; }
.side-card h2 { margin-top: 0; }
.side-by-side { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 1.25rem; margin-top: 1.5rem; align-items: start; }
@media (max-width: 900px) { .side-by-side { grid-template-columns: 1fr; } }
.danger-zone { border-color: var(--danger-soft); }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.3rem 1rem; }
.check-row { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.15rem 0; }
.check-row .muted { font-size: 0.8rem; }

.direction-row { border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; background: var(--bg); margin-bottom: 0.8rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: middle; }
th { background: var(--bg); font-weight: 600; }
tr:last-child td { border-bottom: none; }
table.inner { background: var(--bg); }
table.inner input, table.inner select { padding: 0.3rem 0.45rem; }
.hours-table { max-width: 28rem; }
.hours-table input[type="time"] { width: 8rem; }
.list .actions { white-space: nowrap; }
.list .actions form { display: inline; margin-left: 0.5rem; }
.thumb-cell { width: 3.5rem; }
.thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.thumb-empty { background: var(--bg); border: 1px dashed var(--line); }

/* Badges */
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; text-transform: capitalize; }
.badge-published { background: var(--accent-soft); color: #1d5b33; }
.badge-draft { background: var(--warn-soft); color: var(--warn); }
.badge-archived { background: #eee; color: var(--muted); }
.pill { display: inline-block; padding: 0 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-dark); }

/* Tiles */
.tiles { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1.2rem; min-width: 9rem; text-decoration: none; color: inherit; }
.tile:hover { border-color: var(--accent); }
.tile .num { font-size: 1.6rem; font-weight: 700; }
.tile .label { color: var(--muted); font-size: 0.85rem; }
.tile-action .num { color: var(--accent); }

/* Public: hero + chips + cards */
.hero { padding: 1.5rem 0 0.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); margin: 0 0 0.2rem; }
.hero-title { font-size: 2.2rem; margin: 0 0 0.4rem; letter-spacing: -0.02em; }
.city-switch { font-size: 1rem; font-weight: 400; margin-left: 0.6rem; }
.city-switch a { margin-right: 0.6rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 40rem; margin: 0 0 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1.5rem; }
.chip { display: inline-block; padding: 0.25rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: 0.88rem; }
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: var(--accent-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; opacity: 0.6; }
.ribbon { position: absolute; top: 0.6rem; left: 0.6rem; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; }
.card-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.card-body h2 { margin: 0; font-size: 1.1rem; }
.card-body p { margin: 0; font-size: 0.92rem; }
.meta { display: flex; flex-wrap: wrap; gap: 0.7rem; font-size: 0.88rem; color: var(--muted); margin: 0.2rem 0; }
.tags { color: var(--accent-dark); font-size: 0.82rem; }

/* Public: destination page */
.destination .hero-title { margin-top: 0.2rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.6rem; margin: 1rem 0 1.5rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.gallery figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.facts { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; align-self: start; position: sticky; top: 1rem; }
.facts dl { margin: 0; }
.facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 0.9rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0.1rem 0 0; }
.facts .hours { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.8rem; font-size: 0.9rem; }
.avail-closed { color: var(--danger); }
.direction { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.direction h3 { margin: 0 0 0.2rem; display: flex; align-items: center; gap: 0.5rem; }
.mode { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.5rem; border-radius: 4px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.mode-transit { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }
.steps { margin: 0.4rem 0; padding-left: 1.3rem; }
.rides { background: var(--accent-soft); border-radius: 10px; padding: 1rem 1.25rem; margin-top: 1.5rem; }
.rides h2 { margin-top: 0; }
.ride { border-top: 1px solid rgba(0,0,0,0.08); padding-top: 0.6rem; margin-top: 0.6rem; }

/* Admin photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.8rem; }
.photo { margin: 0; border: 2px solid transparent; border-radius: 8px; padding: 0.3rem; }
.photo.is-hero { border-color: var(--accent); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; }
.photo figcaption { font-size: 0.8rem; margin-top: 0.3rem; display: flex; flex-direction: column; gap: 0.2rem; }
.photo-actions { display: flex; gap: 0.6rem; }
.photo-actions form { display: inline; }
.upload-form { border-top: 1px solid var(--line); padding-top: 0.8rem; }

pre.wrap { white-space: pre-wrap; word-break: break-word; }

/* Marketplace additions */
.badge-pending_review { background: #e8eef4; color: #33506b; }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.tile-alert { border-color: var(--warn); }
.tile-alert .num { color: var(--warn); }
.stack-inline { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.stack-inline input.narrow { width: 9rem; }
.list .actions form { display: inline-flex; margin: 0 0.3rem 0.3rem 0; }
.addon-row { background: var(--card); }
