/* ── Modal overlay & box ─────────────────────────────────────────────────── */
.sailo-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sailo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.sailo-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 92%;
    max-width: 860px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    z-index: 1;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.sailo-header {
    padding: 18px 24px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.sailo-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-right: 32px;
}
.sailo-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin-bottom: 2px;
}
.sailo-subtitle {
    font-size: 12px;
    color: #888;
}
.sailo-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.sailo-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s, color .15s;
    z-index: 2;
}
.sailo-close:hover { background: #f5f5f5; color: #333; }

/* ── Step indicators ─────────────────────────────────────────────────────── */
.sailo-steps {
    display: flex;
    align-items: center;
    padding: 12px 0;
}
.sailo-step-ind {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.sailo-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: background .2s, color .2s;
}
.sailo-step-lbl {
    font-size: 10px;
    color: #bbb;
    font-weight: 500;
    transition: color .2s;
    white-space: nowrap;
}
/* Active (next step to fill) — orange */
.sailo-step-ind--on .sailo-step-circle {
    background: #e05c24;
    color: #fff;
}
.sailo-step-ind--on .sailo-step-lbl {
    color: #e05c24;
    font-weight: 700;
}
/* Done (completed step) — green */
.sailo-step-ind--done .sailo-step-circle {
    background: #27ae60;
    color: #fff;
}
.sailo-step-ind--done .sailo-step-lbl {
    color: #27ae60;
    font-weight: 700;
}
.sailo-step-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
    margin: 0 6px 14px;
    transition: background .2s;
}
.sailo-step-ind--done + .sailo-step-line { background: #27ae60; }

/* ── Body: two-column ────────────────────────────────────────────────────── */
.sailo-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.sailo-col {
    overflow-y: auto;
    padding: 20px 20px 24px;
}
.sailo-col--left {
    flex: 0 0 48%;
    border-right: 1px solid #f0f0f0;
}
.sailo-col--right {
    flex: 1;
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.sailo-section { margin-bottom: 20px; }
.sailo-sec-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
}

/* ── Fields & input wrapper ──────────────────────────────────────────────── */
.sailo-field { margin-bottom: 12px; }
.sailo-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.sailo-opt {
    font-style: normal;
    font-weight: 400;
    color: #aaa;
    font-size: 11px;
}
.sailo-iw {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    gap: 6px;
    background: #fff;
    transition: border-color .15s;
    position: relative;
    overflow: visible;
}
.sailo-iw:focus-within { border-color: #e05c24; }
.sailo-iw.sailo-err { border-color: #e05c24; }
.sailo-iw input[type="text"],
.sailo-iw input[type="tel"],
.sailo-iw input[type="email"] {
    flex: 1;
    min-width: 0;
    width: 100%;
}
.sailo-iw input::-webkit-input-placeholder {
    color: #bbb;
    opacity: 1;
    vertical-align: middle;
    line-height: normal;
    position: relative;
    top: 1px;
}
.sailo-iw input::placeholder {
    color: #bbb;
    opacity: 1;
    vertical-align: middle;
    line-height: normal;
    position: relative;
    top: 1px;
}

/* Icons sit absolutely so they don't consume flex space or affect input height */
.sailo-iw > svg,
.sailo-iw > .sailo-dot {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    flex-shrink: 0;
    z-index: 1;
}
.sailo-field-err {
    color: #e05c24;
    font-size: 11px;
    display: none;
    margin-top: 4px;
}
.sailo-dt-input {
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    color: #222;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
    background: #fff;
}
.sailo-dt-input:focus { border-color: #e05c24; }

/* Date input inside .sailo-iw: remove its own border, let the wrapper provide it */
.sailo-iw .sailo-dt-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 9px 4px 9px 34px;
    font-size: 13px !important;
    box-shadow: none;
    transition: none;
    cursor: pointer;
}
.sailo-iw:has(.sailo-dt-input) { cursor: pointer; }
.sailo-iw .sailo-dt-input:focus { border-color: transparent; }
.sailo-iw .sailo-dt-input::-webkit-input-placeholder {
    color: #bbb;
    opacity: 1;
    vertical-align: middle;
    line-height: normal;
    position: relative;
    top: 1px;
}
.sailo-iw .sailo-dt-input::placeholder {
    color: #bbb;
    opacity: 1;
    vertical-align: middle;
    line-height: normal;
    position: relative;
    top: 1px;
}

/* ── Location dots & route connector ─────────────────────────────────────── */
.sailo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sailo-dot--pick { background: #e05c24; }
.sailo-dot--drop { background: transparent; border: 2px solid #aaa; }
.sailo-route-connector {
    width: 2px;
    height: 18px;
    background: repeating-linear-gradient(to bottom, #ddd 0, #ddd 4px, transparent 4px, transparent 8px);
    margin: -6px 0 -6px 15px;
}

/* ── Add / remove stop buttons ───────────────────────────────────────────── */
.sailo-add-stop,
.sailo-rm-stop {
    flex-shrink: 0;
    border: none;
    background: none;
    cursor: pointer;
    line-height: 1;
    border-radius: 4px;
    padding: 3px 5px;
    margin-right: 6px;
}
.sailo-add-stop { color: #e05c24; font-size: 20px; font-weight: 600; }
.sailo-add-stop:hover { background: #e05c24; color: #fff; }
.sailo-rm-stop { color: #aaa; font-size: 18px; font-weight: 400; }
.sailo-rm-stop:hover { background: #e05c24; color: #fff; }

/* ── Vehicle grid ────────────────────────────────────────────────────────── */
.sailo-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.sailo-vc-hint {
    grid-column: 1 / -1;
    color: #bbb;
    font-size: 12px;
    text-align: center;
    padding: 28px 8px;
    margin: 0;
}
.sailo-vehicle-card {
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 10px 6px 8px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, background .15s;
}
.sailo-vehicle-card:hover { border-color: #e05c24; }
.sailo-vehicle-card.selected {
    border-color: #e05c24;
    background: #fff8f5;
}
.sailo-vehicle-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 6px;
    width: 16px;
    height: 16px;
    background: #e05c24;
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.sailo-vehicle-card img {
    width: 100%;
    height: 52px;
    object-fit: contain;
    display: block;
}
.sailo-vehicle-card .vc-name {
    font-size: 11px;
    font-weight: 700;
    color: #222;
    margin: 6px 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sailo-vehicle-card.selected .vc-name { color: #e05c24; }
.sailo-vehicle-card .vc-cap {
    font-size: 10px;
    color: #999;
}

/* ── Payment box ─────────────────────────────────────────────────────────── */
.sailo-payment-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.sailo-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 8px;
    color: #333;
}
.sailo-radio input[type="radio"] { accent-color: #e05c24; }
.sailo-charge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    padding-top: 10px;
    font-size: 13px;
    color: #555;
}
.sailo-charge-row strong { color: #e05c24; font-size: 16px; }

/* ── Message bar ─────────────────────────────────────────────────────────── */
.sailo-msg {
    margin: 0 20px 8px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 12px;
    flex-shrink: 0;
}
.sailo-msg.error { background: #fff0f0; color: #c0392b; border: 1px solid #f5c6c6; }
.sailo-msg.info  { background: #fffbea; color: #856404; border: 1px solid #ffeeba; }

/* ── Bottom bar ──────────────────────────────────────────────────────────── */
.sailo-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}
.sailo-bar-vehicle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.sailo-bar-img {
    width: 64px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}
.sailo-bar-name { font-size: 14px; font-weight: 700; color: #111; }
.sailo-bar-cap  { font-size: 12px; color: #888; }
.sailo-bar-fare { text-align: center; flex-shrink: 0; }
.sailo-bar-fare-lbl { font-size: 11px; color: #888; }
.sailo-bar-fare-amt { font-size: 20px; font-weight: 800; color: #e05c24; }
.sailo-bar-btn {
    background: #e05c24;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s;
}
.sailo-bar-btn:hover { background: #c44d1a; }
.sailo-bar-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.sailo-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sailo-spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}
@keyframes sailo-spin { to { transform: rotate(360deg); } }

/* ── Open button (shortcode) ─────────────────────────────────────────────── */
.sailo-open-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #e05c24;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.sailo-open-btn:hover { background: #c44d1a; }

/* ── Booking result page ─────────────────────────────────────────────────── */
.sailo-result {
    max-width: 520px;
    margin: 60px auto;
    padding: 48px 36px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}
.sailo-result--success { background: #f0fff4; border: 1.5px solid #b2dfcc; }
.sailo-result--error   { background: #fff0f0; border: 1.5px solid #f5c6c6; }
.sailo-result--info    { background: #fffbea; border: 1.5px solid #ffeeba; }
.sailo-result-icon { font-size: 52px; margin-bottom: 16px; line-height: 1; }
.sailo-result--success .sailo-result-icon { color: #27ae60; }
.sailo-result--error   .sailo-result-icon { color: #c0392b; }
.sailo-result--info    .sailo-result-icon { color: #856404; }
.sailo-result h2 { margin: 0 0 12px; font-size: 26px; color: #1a1a2e; }
.sailo-result p  { color: #444; font-size: 15px; margin: 8px 0; }
.sailo-result-ref { margin-top: 16px !important; font-size: 16px !important; }
.sailo-result-ref strong { color: #e05c24; }

/* ── Google Places dropdown fix ──────────────────────────────────────────── */
.pac-container { z-index: 999999 !important; }

/* ── Flatpickr overrides ─────────────────────────────────────────────────── */
.flatpickr-calendar { z-index: 999999 !important; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus { background: #e05c24; border-color: #e05c24; }
.flatpickr-day.today { border-color: #e05c24; }
.flatpickr-day.today:hover { background: #e05c24; border-color: #e05c24; color: #fff; }
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus { background: #fdf0ec; }
.sailo-fp-done {
    display: block;
    width: calc(100% - 16px);
    margin: 6px 8px 8px;
    padding: 8px;
    background: #e05c24;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.sailo-fp-done:hover { background: #c94e1e; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .sailo-box {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    .sailo-body {
        flex-direction: column;
        overflow-y: auto;
        padding: 0 24px;
    }
    .sailo-col {
        overflow-y: visible;
        padding-left: 0;
        padding-right: 0;
    }
    .sailo-col--left {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
    .sailo-col--right { flex: none; }
    .sailo-vehicle-grid { grid-template-columns: repeat(2, 1fr); }
    .sailo-step-lbl { display: none; }
    .sailo-step-line { margin-bottom: 0; }
    .sailo-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    .sailo-bar-vehicle { flex: 1 1 100%; }
    .sailo-bar-fare { flex: 1; text-align: left; }
    .sailo-bar-btn { flex: 1; text-align: center; }
    .sailo-header-top { padding-right: 36px; }
    /* Prevent iOS Safari from auto-zooming when inputs are focused */
    .sailo-iw input,
    .sailo-dt-input { font-size: 16px !important; }
    /* Prevent double-tap zoom on buttons */
    .sailo-modal button { touch-action: manipulation; }
}
@media (max-width: 400px) {
    .sailo-vehicle-grid { grid-template-columns: repeat(2, 1fr); }
    .sailo-col { padding-top: 16px; padding-bottom: 20px; }
}
