/* ================================================================
   Zenda Trip Booking v6 — CSS
================================================================ */

/* Widget wrapper */
.ztb-widget {
    max-width: 480px;
    margin: 20px 0;
    font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* Field row */
.ztb-field { margin-bottom: 18px; }
.ztb-lbl {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* Date select */
.ztb-sel-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}
.ztb-sel {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    appearance: none;
    cursor: pointer;
    color: #374151;
    box-sizing: border-box;
}
.ztb-sel:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.ztb-chev {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
    display: flex;
}

/* Counter */
.ztb-ctr {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}
.ztb-cb {
    width: 38px; height: 38px;
    border: none;
    background: #f9fafb;
    font-size: 18px;
    cursor: pointer;
    color: #374151;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.ztb-cb:hover:not(:disabled) { background: #e5e7eb; }
.ztb-cb:disabled { color: #d1d5db; cursor: default; }
.ztb-cv {
    min-width: 44px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    padding: 0 4px;
}

/* ── Live price display ── */
.ztb-price-display { margin: 4px 0 14px; min-height: 20px; }
.ztb-price-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 8px;
    padding: 9px 14px;
}
.ztb-price-base { font-size: 14px; font-weight: 600; color: #374151; }
.ztb-price-per  { font-size: 11px; font-weight: 400; color: #9ca3af; margin-left: 2px; }
.ztb-price-sep, .ztb-price-eq { font-size: 15px; color: #9ca3af; }
.ztb-price-persons { font-size: 14px; font-weight: 700; color: #374151; }
.ztb-price-total   { font-size: 17px; font-weight: 800; color: #16a34a; margin-left: 2px; }

/* ── Seat hint ── */
.ztb-seat-hint {
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 20px;
}
.ztb-hint-need { color: #d97706; font-weight: 600; }
.ztb-hint-ok   { color: #16a34a; font-weight: 600; }
.ztb-hint-over { color: #ef4444; font-weight: 600; }
.ztb-hint-info { color: #6b7280; }

/* Seat section */
.ztb-seat-section { }
.ztb-seat-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #6b7280;
}
.ztb-seat-clear {
    font-size: 12px;
    padding: 3px 10px;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.ztb-seat-clear:hover { background: #fecaca; }

/* Bus wrapper */
.ztb-bus-wrap { overflow-x: auto; }
.ztb-bus {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 16px;
    min-width: 200px;
}

/* Bus front */
.ztb-bus-front {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0 10px;
    border-bottom: 2px dashed #d1d5db;
    margin-bottom: 4px;
}
.ztb-driver-icon { font-size: 22px; }
.ztb-driver-label { font-size: 11px; font-weight: 800; color: #9ca3af; letter-spacing: .8px; text-transform: uppercase; }

/* Seat row */
.ztb-seat-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ztb-row-label {
    width: 18px;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-align: center;
    flex-shrink: 0;
}
.ztb-seat-group { display: flex; gap: 5px; }
.ztb-seat-group.ztb-right { justify-content: flex-end; min-width: var(--ztb-right-w, auto); }
.ztb-aisle { width: 20px; flex-shrink: 0; }

/* Individual seat */
.ztb-seat {
    width: 38px; height: 38px;
    border: 2px solid #d1d5db;
    border-radius: 8px 8px 6px 6px;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.ztb-seat::before {
    content: '';
    position: absolute;
    top: -3px; left: 4px; right: 4px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 3px 3px 0 0;
}
.ztb-seat:hover:not(.ztb-seat-booked):not(:disabled) {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4f46e5;
    transform: translateY(-1px);
}
.ztb-seat.ztb-seat-selected {
    border-color: #16a34a;
    background: #dcfce7;
    color: #15803d;
}
.ztb-seat.ztb-seat-selected::before { background: #86efac; }
.ztb-seat.ztb-seat-booked {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #ef4444;
    cursor: not-allowed;
}
.ztb-seat.ztb-seat-booked::before { background: #fca5a5; }

/* Legend */
.ztb-seat-legend {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.ztb-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #6b7280;
}
.ztb-legend-box {
    width: 14px; height: 14px;
    border-radius: 3px;
    border: 1.5px solid;
    display: inline-block;
}
.ztb-leg-avail  { background: #fff;     border-color: #d1d5db; }
.ztb-leg-sel    { background: #dcfce7;  border-color: #16a34a; }
.ztb-leg-booked { background: #fee2e2;  border-color: #fca5a5; }

/* Buy button */
.ztb-buy {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 18px;
    transition: opacity .2s, transform .1s;
    letter-spacing: .3px;
}
.ztb-buy:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.ztb-buy:disabled { opacity: .55; cursor: not-allowed; }

/* Messages */
.ztb-msg {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0;
    min-height: 0;
}
.ztb-msg.err {
    color: #dc2626;
    background: #fee2e2;
    padding: 10px 14px;
}
.ztb-msg.ok {
    color: #166534;
    background: #dcfce7;
    padding: 10px 14px;
}
.ztb-msg a { color: #166534; font-weight: 700; }
