/* ── Campsite Booking Manager – Frontend CSS ────────────────── */
:root {
    --bm-primary:   #1d4ed8;
    --bm-primary-d: #1e40af;
    --bm-success:   #15803d;
    --bm-danger:    #dc2626;
    --bm-text:      #111827;
    --bm-muted:     #6b7280;
    --bm-border:    #e5e7eb;
    --bm-bg:        #f9fafb;
    --bm-radius:    10px;
    --bm-shadow:    0 4px 20px rgba(0,0,0,.08);
}

#bm-booking-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    color: var(--bm-text);
}

/* ── Steps ── */
.bm-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.bm-step {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 500; color: var(--bm-muted);
}
.bm-step-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--bm-border); color: var(--bm-muted);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
    transition: all .2s;
}
.bm-step.active .bm-step-num   { background: var(--bm-primary); color: #fff; }
.bm-step.active .bm-step-lbl   { color: var(--bm-primary); font-weight: 700; }
.bm-step.done .bm-step-num     { background: var(--bm-success); color: #fff; }
.bm-step-arrow { color: var(--bm-border); font-size: 18px; }

/* ── Panels ── */
.bm-step-panel { display: none; }
.bm-step-panel.active { display: block; }
.bm-panel-title { font-size: 22px; font-weight: 800; margin: 0 0 24px; color: var(--bm-text); }

/* ── Form grid ── */
.bm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}
.bm-field { display: flex; flex-direction: column; gap: 6px; }
.bm-field-full { grid-column: 1 / -1; }
.bm-field label { font-size: 14px; font-weight: 600; color: var(--bm-text); }
.bm-field input,
.bm-field select,
.bm-field textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--bm-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--bm-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
    box-sizing: border-box;
}
.bm-field input:focus,
.bm-field select:focus,
.bm-field textarea:focus {
    outline: none;
    border-color: var(--bm-primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.bm-req { color: var(--bm-danger); }

/* ── Toggle group (pets radio) ── */
.bm-toggle-group { display: flex; gap: 10px; flex-wrap: wrap; }
.bm-toggle-opt {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 16px;
    border: 1.5px solid var(--bm-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
    background: #fff;
}
.bm-toggle-opt input[type=radio] { display: none; }
.bm-toggle-opt.selected,
.bm-toggle-opt:has(input:checked) { border-color: var(--bm-primary); background: #eff6ff; color: var(--bm-primary); }

/* ── Info box ── */
.bm-info-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #0369a1;
    margin-bottom: 20px;
}

/* ── Parcel cards ── */
.bm-parcels-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.bm-parcel-card-sel {
    border: 2px solid var(--bm-border);
    border-radius: var(--bm-radius);
    padding: 18px 20px;
    cursor: pointer;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
}
.bm-parcel-card-sel:hover   { border-color: var(--bm-primary); }
.bm-parcel-card-sel.selected {
    border-color: var(--bm-primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.12);
    background: #eff6ff;
}
.bm-parcel-name  { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.bm-parcel-type-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}
.bm-pill-grass { background: #dcfce7; color: #14532d; }
.bm-pill-mixed { background: #fef3c7; color: #92400e; }
.bm-parcel-desc  { font-size: 13px; color: var(--bm-muted); margin: 4px 0; }
.bm-parcel-cap   { font-size: 13px; color: var(--bm-muted); }
.bm-parcel-price-col { text-align: right; min-width: 120px; }
.bm-parcel-price     { font-size: 18px; font-weight: 800; color: var(--bm-primary); }
.bm-parcel-price-nights { font-size: 12px; color: var(--bm-muted); }
.bm-parcel-select-indicator {
    width: 22px; height: 22px;
    border: 2px solid var(--bm-border);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: all .15s;
    flex-shrink: 0;
    margin-top: 2px;
}
.bm-parcel-card-sel.selected .bm-parcel-select-indicator {
    background: var(--bm-primary);
    border-color: var(--bm-primary);
    color: #fff;
}

/* ── Summary ── */
.bm-summary-box {
    background: #f9fafb;
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius);
    overflow: hidden;
    margin-bottom: 20px;
}
.bm-summary-section { padding: 16px 20px; border-bottom: 1px solid var(--bm-border); }
.bm-summary-section:last-child { border-bottom: none; }
.bm-summary-section h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--bm-muted); }
.bm-summary-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.bm-summary-label { color: var(--bm-muted); }
.bm-summary-total {
    display: flex; justify-content: space-between;
    padding: 16px 20px;
    background: var(--bm-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

/* ── Price breakdown ── */
.bm-breakdown { margin-top: 6px; }
.bm-breakdown-line { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--bm-muted); border-bottom: 1px dashed var(--bm-border); }
.bm-breakdown-line:last-child { border: none; }

/* ── Policy box ── */
.bm-policy-box {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 20px;
}

/* ── Buttons ── */
.bm-step-nav { display: flex; gap: 10px; margin-top: 24px; align-items: center; }
.bm-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .15s;
}
.bm-btn:disabled { opacity: .5; cursor: not-allowed; }
.bm-btn-primary  { background: var(--bm-primary); color: #fff; }
.bm-btn-primary:hover:not(:disabled) { background: var(--bm-primary-d); }
.bm-btn-secondary { background: var(--bm-bg); color: var(--bm-text); border: 1.5px solid var(--bm-border); }
.bm-btn-secondary:hover { background: var(--bm-border); }
.bm-btn-success  { background: #16a34a; color: #fff; font-size: 16px; padding: 14px 32px; }
.bm-btn-success:hover:not(:disabled) { background: #15803d; }

/* ── Messages ── */
.bm-msg-error { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-bottom: 12px; }
.bm-loading { color: var(--bm-muted); font-style: italic; padding: 16px 0; }

/* ── Success ── */
.bm-success-box {
    text-align: center;
    padding: 40px 20px;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: var(--bm-radius);
}
.bm-success-icon { font-size: 56px; margin-bottom: 16px; }
.bm-success-box h2 { font-size: 26px; font-weight: 800; color: var(--bm-success); margin: 0 0 12px; }
.bm-success-box p { font-size: 16px; color: #374151; margin: 0 0 8px; }
.bm-success-note { font-size: 13px; color: var(--bm-muted) !important; }

/* ── Parcels list (shortcode) ── */
.bm-parcels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.bm-parcel-card { background: #fff; border: 1.5px solid var(--bm-border); border-radius: var(--bm-radius); padding: 20px; }
.bm-parcel-card h3 { margin: 8px 0 6px; font-size: 17px; }
.bm-parcel-card p { color: var(--bm-muted); font-size: 14px; margin: 0 0 8px; }
.bm-parcel-meta { font-size: 13px; color: var(--bm-muted); }
.bm-parcel-type { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.bm-type-grass { background: #dcfce7; color: #14532d; }
.bm-type-mixed { background: #fef3c7; color: #92400e; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .bm-form-grid { grid-template-columns: 1fr; }
    .bm-steps { gap: 2px; }
    .bm-step-lbl { display: none; }
    .bm-parcel-card-sel { grid-template-columns: 1fr; }
}

/* ── Parcel type cards ──────────────────────────────────────── */
.bm-parcel-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.bm-type-card {
    border: 1.5px solid var(--bm-border);
    border-radius: var(--bm-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--bm-shadow);
}
.bm-type-card-header {
    padding: 20px 22px 16px;
    display: flex; align-items: center; gap: 12px;
}
.bm-tc-grass { background: linear-gradient(135deg,#d1fae5,#a7f3d0); }
.bm-tc-mixed { background: linear-gradient(135deg,#fef3c7,#fde68a); }
.bm-type-icon { font-size: 32px; }
.bm-type-card-header h3 { margin: 0; font-size: 18px; font-weight: 800; color: #111827; }
.bm-type-card-body { padding: 16px 22px 20px; }
.bm-type-desc { font-size: 14px; color: var(--bm-muted); margin: 0 0 14px; }
.bm-type-meta { display: flex; flex-direction: column; gap: 8px; }
.bm-meta-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; }
.bm-meta-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.bm-meta-price { font-weight: 700; color: var(--bm-primary); font-size: 15px; margin-top: 4px; }

/* ── Availability section ───────────────────────────────────── */
.bm-avail-section { margin-top: 8px; }
.bm-avail-title { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.bm-avail-subtitle { font-size: 14px; color: var(--bm-muted); margin: 0 0 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bm-avail-legend { display: inline-flex; align-items: center; gap: 6px; }
.bm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; }
.bm-dot-free { background: #22c55e; }
.bm-dot-low  { background: #f59e0b; }
.bm-dot-full { background: #ef4444; }

.bm-cal-controls {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 14px;
}
.bm-cal-nav-btn {
    background: #fff; border: 1.5px solid var(--bm-border); border-radius: 8px;
    width: 36px; height: 36px; font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.bm-cal-nav-btn:hover { border-color: var(--bm-primary); color: var(--bm-primary); }
.bm-cal-month-label { font-size: 17px; font-weight: 700; min-width: 160px; }

.bm-avail-type-toggle { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.bm-type-toggle {
    padding: 7px 16px; border-radius: 20px;
    border: 1.5px solid var(--bm-border);
    background: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.bm-type-toggle.active { background: var(--bm-primary); color: #fff; border-color: var(--bm-primary); }

/* ── Availability grid ──────────────────────────────────────── */
.bm-avail-calendar { border: 1.5px solid var(--bm-border); border-radius: var(--bm-radius); overflow: hidden; }
.bm-cal-loading { padding: 30px; text-align: center; color: var(--bm-muted); font-style: italic; }
.bm-avail-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}
.bm-avail-head {
    background: #1d4ed8; color: #fff;
    text-align: center; padding: 8px 4px;
    font-size: 12px; font-weight: 700;
}
.bm-avail-cell {
    padding: 6px 4px 8px;
    text-align: center;
    border-right: 1px solid var(--bm-border);
    border-bottom: 1px solid var(--bm-border);
    min-height: 58px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
}
.bm-avail-cell:nth-child(7n) { border-right: none; }
.bm-avail-empty { background: #f9fafb; }
.bm-avail-past  { background: #f9fafb; opacity: .45; }
.bm-avail-day   { font-size: 13px; font-weight: 600; color: #374151; }
.bm-avail-status { font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 10px; white-space: nowrap; }
.bm-avail-free .bm-avail-status  { background: #dcfce7; color: #14532d; }
.bm-avail-low .bm-avail-status   { background: #fef3c7; color: #92400e; }
.bm-avail-full .bm-avail-day     { color: #9ca3af; }
.bm-avail-full .bm-avail-status  { background: #fee2e2; color: #991b1b; }
.bm-avail-na .bm-avail-status    { background: #f3f4f6; color: #9ca3af; }

@media (max-width: 480px) {
    .bm-avail-cell { min-height: 44px; padding: 4px 2px; }
    .bm-avail-day  { font-size: 11px; }
    .bm-avail-status { font-size: 9px; padding: 1px 3px; }
    .bm-parcel-type-cards { grid-template-columns: 1fr; }
}

/* ── Coupon row ─────────────────────────────────────────────── */
.bm-coupon-row { margin-bottom: 20px; }
.bm-coupon-input-wrap { display: flex; gap: 8px; margin-bottom: 8px; }
.bm-coupon-input-wrap input {
    flex: 1; padding: 10px 14px;
    border: 1.5px solid var(--bm-border);
    border-radius: 8px; font-size: 14px;
    text-transform: uppercase; letter-spacing: 1px;
}
.bm-coupon-line .bm-summary-label { color: #15803d; }
#bm-coupon-msg { font-size: 13px; }

/* ── Contact form ────────────────────────────────────────────── */
.bm-contact-wrap { max-width: 680px; margin: 0 auto; }
.bm-contact-title { font-size: 22px; font-weight: 800; margin: 0 0 20px; }
.bm-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.bm-contact-success {
    text-align: center; padding: 40px 20px;
    background: #f0fdf4; border: 2px solid #bbf7d0;
    border-radius: var(--bm-radius);
}
.bm-contact-success .bm-success-icon { font-size: 48px; margin-bottom: 12px; }
.bm-contact-success h3 { font-size: 22px; font-weight: 800; color: var(--bm-success); margin-bottom: 8px; }
@media (max-width: 600px) {
    .bm-contact-grid { grid-template-columns: 1fr; }
}

/* ── Coupon toggle section ──────────────────────────────────── */
.bm-coupon-section { margin-bottom: 20px; }
.bm-coupon-toggle-row { margin-bottom: 8px; }
.bm-coupon-toggle-link {
    font-size: 13px; color: var(--bm-primary);
    text-decoration: none; font-weight: 500;
}
.bm-coupon-toggle-link:hover { text-decoration: underline; }
.bm-coupon-applied-row {
    display: flex; align-items: center; gap: 12px;
    background: #dcfce7; color: #14532d;
    padding: 8px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    margin-top: 8px;
}
.bm-remove-coupon-link {
    color: #991b1b; text-decoration: none;
    font-size: 12px; font-weight: 700;
    margin-left: auto;
}
.bm-remove-coupon-link:hover { text-decoration: underline; }

/* ── Residence tax notice ────────────────────────────────────── */
.bm-tax-notice {
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    border-radius: var(--bm-radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #78350f;
}
.bm-tax-notice strong { color: #92400e; }
.bm-tax-list {
    margin: 8px 0 6px 18px;
    list-style: disc;
    font-size: 14px;
}
.bm-tax-list li { margin-bottom: 3px; }
.bm-tax-extra { margin: 6px 0 0; font-size: 13px; color: #92400e; font-style: italic; }

/* ── Custom booking page headline ───────────────────────────── */
.bm-page-headline {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 24px;
    color: var(--bm-text);
}

/* ── Disabled departure date field ─────────────────────────── */
#bm-depart:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}
