/* ParkBooking — mobile-first stylesheet. Users are predominantly on phones. */

:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --ink: #1f2a37;
    --muted: #6b7280;
    --brand: #0f766e;
    --brand-dark: #0b5850;
    --accent: #f59e0b;
    --line: #e5e7eb;
    --danger: #dc2626;
    --ok: #16a34a;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    position: sticky; top: 0; z-index: 10;
    background: var(--brand);
    color: #fff;
    padding: env(safe-area-inset-top) 16px 0;
    min-height: 52px;
    display: flex; align-items: center;
    box-shadow: var(--shadow);
}
.topbar .brand { color: #fff; font-weight: 700; font-size: 18px; padding: 14px 0; }
.topbar .brand:hover { text-decoration: none; }

.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }

h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Cards ------------------------------------------------------------------- */
.card {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin: 12px 0;
    color: inherit;
}
a.card:hover { text-decoration: none; border-color: var(--brand); }

.card .logo {
    width: 56px; height: 56px; border-radius: 10px; object-fit: cover;
    background: #eef2f1; float: left; margin-right: 12px;
}
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card .blurb { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.clearfix::after { content: ""; display: table; clear: both; }

/* Company/site card links (social, maps, reviews) --------------------------- */
a.card-main { display: block; color: inherit; }
a.card-main:hover { text-decoration: none; }
.social-row, .site-links { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.social, .site-link {
    font-size: 13px; font-weight: 600; color: var(--brand-dark);
    text-decoration: none; white-space: nowrap;
}
.social:hover, .site-link:hover { text-decoration: underline; }
.stars { color: #f59e0b; letter-spacing: 1px; margin: 0; }
.review-body { margin: 4px 0; white-space: pre-wrap; }

/* Honeypot field — visually hidden, off-screen (bots fill it, humans don't). */
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

.badge {
    display: inline-block; font-size: 12px; font-weight: 600;
    padding: 2px 8px; border-radius: 999px; background: #ecfdf5; color: var(--brand-dark);
    margin-right: 6px;
}
.badge.cabin { background: #fef3c7; color: #92400e; }
.price { font-weight: 700; color: var(--ink); }

/* Forms / buttons --------------------------------------------------------- */
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
/* Full-width styling for text-like fields only — NOT checkboxes/radios. */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    width: 100%; padding: 12px; font-size: 16px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

/* Checkbox / radio rows: a tick box beside its label, on one line. */
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0; }
label.check {
    display: flex; align-items: center; gap: 10px;
    font-weight: 400; margin: 10px 0; cursor: pointer;
}
label.check input[type="checkbox"], label.check input[type="radio"] {
    flex: 0 0 auto; width: 18px; height: 18px;
}
/* Grouped list of site tick boxes. */
.site-checks {
    border: 1px solid var(--line); border-radius: 10px;
    padding: 6px 12px; margin: 4px 0 8px;
}
.site-checks label.check { margin: 8px 0; }

.btn {
    display: inline-block; width: 100%; text-align: center;
    background: var(--brand); color: #fff; font-weight: 700; font-size: 16px;
    padding: 14px 16px; border: 0; border-radius: 10px; cursor: pointer;
    margin-top: 16px;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; margin-top: 0; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Messages ---------------------------------------------------------------- */
.notice { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.notice.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.notice.ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }
.notice.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.spinner { text-align: center; color: var(--muted); padding: 30px; }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

/* Hero (landing) ---------------------------------------------------------- */
.hero { text-align: center; padding: 32px 8px 8px; }
.hero h1 { font-size: 28px; }
.hero p { color: var(--muted); max-width: 520px; margin: 8px auto 20px; }

/* Booking summary --------------------------------------------------------- */
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.summary .line { display: flex; justify-content: space-between; padding: 4px 0; }
.summary .total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

/* Spot images ------------------------------------------------------------- */
.card-photo { width: 100%; height: 170px; object-fit: cover; border-radius: 10px; margin: 4px 0 10px; display: block; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.gallery img { height: 190px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.thumb { width: 76px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.thumb-wrap { position: relative; display: inline-block; }
.thumb-x {
    position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; padding: 0;
    border: 0; border-radius: 50%; background: var(--danger); color: #fff;
    font-weight: 700; line-height: 18px; cursor: pointer;
}
input[type="file"] { padding: 10px; background: #fff; }

.img-manage { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.img-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px; border-radius: 8px; }
.img-row[draggable="true"] { cursor: grab; }
.img-row[draggable="true"]:active { cursor: grabbing; }
.img-row.dragging { opacity: .5; }
.img-row.drag-over { outline: 2px dashed var(--brand); outline-offset: -2px; background: #ecfdf5; }
.img-row .thumb { width: 96px; height: 66px; }
.img-ctrls { display: flex; gap: 6px; flex-wrap: wrap; }
.img-ctrls .btn { margin-top: 0; }

.logo-preview { max-width: 180px; max-height: 110px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; margin: 6px 0; object-fit: contain; }
.company-logo { max-width: 200px; max-height: 120px; border-radius: 10px; display: block; margin: 8px 0; object-fit: contain; }

#card-element { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
#card-errors { color: var(--danger); font-size: 14px; margin-top: 6px; min-height: 18px; }
