/* ================================
   TBK BOOKING – LAYOUT (V3)
   Focus: arrangement / spacing (not color theming)
   ================================ */

#tbk-booking-wrapper{
    max-width:1200px;
    margin:40px auto;
    background:#ffffff;
    border-radius:16px;
    box-shadow:0 15px 40px rgba(0,0,0,0.10);
    padding:28px;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif;
}

/* Step navigation (top) */
.tbk-steps-nav{
    display:flex;
    justify-content:center;
    align-items:flex-start;
    gap:90px;
    padding:6px 0 22px;
}

/* Promo line */
.tbk-fast-booking{
    text-align:center;
    font-weight:700;
    font-size:14px;
    letter-spacing:.01em;
    color:#111827;
    margin:2px 0 14px;
}

.tbk-steps-nav-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    opacity:.45;
    user-select:none;
}

.tbk-steps-nav-item.is-active{
    opacity:1;
}

.tbk-step-circle{
    width:40px;
    height:40px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #d1d5db;
    background:#f3f4f6;
    font-weight:700;
    font-size:14px;
    line-height:1;
}

.tbk-steps-nav-item.is-active .tbk-step-circle{
    border-color:#111827;
    background:#ffffff;
}

.tbk-step-caption{
    font-size:12px;
    line-height:1.2;
    text-align:center;
    letter-spacing:.01em;
    color:#111827;
}

/* Steps */
.tbk-step{
    margin-bottom:24px;
}

.tbk-step-title{
    /* The top stepper acts as the main title area */
    display:none;
}

/* Common fields */
.tbk-field-group{
    margin-bottom:0;
}

.tbk-field-group label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
    font-size:12px;
    letter-spacing:.03em;
    text-transform:uppercase;
    color:#111827;
}

.tbk-field-group input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.tbk-field-group select,
.tbk-field-group textarea{
    width:100%;
    /* Step 1 fields were too "thin" (height) */
    padding:14px 14px;
    min-height:46px;
    border-radius:8px;
    border:1px solid #d0d4dd;
    font-size:14px;
    background:#ffffff;
}

.tbk-field-group textarea{
    min-height:120px;
    resize:vertical;
}

.tbk-field-group small{
    display:block;
    margin-top:6px;
    font-size:12px;
    color:#6b7280;
}

/* Radios (Step 1) */
.tbk-radio-group{
    display:flex;
    flex-direction:row;
    gap:18px;
    margin-top:8px;
    align-items:center;
    flex-wrap:wrap;
}

.tbk-radio-group label{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:14px;
    font-weight:600;
    text-transform:none;
    letter-spacing:0;
    margin:0;
    cursor:pointer;
}

/* Checkbox-like (square) radios */
.tbk-radio-group input[type="radio"]{
    -webkit-appearance:none;
    appearance:none;
    width:18px;
    height:18px;
    border:2px solid #9ca3af;
    border-radius:4px;
    background:#fff;
    display:inline-block;
    position:relative;
    margin:0;
    transform:none;
}

.tbk-radio-group input[type="radio"]:checked{
    border-color:#111827;
}

.tbk-radio-group input[type="radio"]:checked::after{
    content:"";
    position:absolute;
    inset:3px;
    background:#111827;
    border-radius:2px;
}

/* Terms checkbox (Step 3) */

.tbk-terms-label{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:14px;
    font-weight:600;
    text-transform:none;
    letter-spacing:0;
    margin:0;
}

.tbk-terms-label input[type="checkbox"]{
    width:18px !important;
    height:18px !important;
    min-width:18px;
    min-height:18px;
    margin:0;
    position:static !important;
    transform:none;
}

/* Step 1 layout helpers */
.tbk-flex-row{
    display:flex;
    gap:16px;
}

.tbk-flex-row .tbk-field-group{
    flex:1;
}

/* Step 1: Child seats + Transfer type in same line */
.tbk-child-transfer-row{
    align-items:flex-end;
    gap:22px;
    flex-wrap:wrap;
}
.tbk-child-transfer-row .tbk-field-group:first-child{
    flex:0 0 240px;
}
.tbk-child-transfer-row .tbk-field-group:last-child{
    flex:1;
    min-width: 260px;
}

/* Stops */
.tbk-add-stop-row{
    position: relative;
    height: 52px;           /* fixed gap so + is exactly centered between fields */
    margin: 0;
}

.tbk-add-stop{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #111827;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;

    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* true center */
}

.tbk-add-stop-text{
    position: absolute;
    left: calc(50% + 30px); /* text does not move the + */
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #444;
    white-space: nowrap;
}

.tbk-stop-container{
    margin-bottom:10px;
}

.tbk-stop-row{
    display:flex;
    gap:8px;
}

.tbk-stop-row .tbk-stop-input{
    flex:1;
}

.tbk-remove-stop{
    border:none;
    border-radius:8px;
    padding:0 10px;
    font-size:14px;
    cursor:pointer;
    background:#e11d48;
    color:#fff;
}

/* Step 2 & 3: two-column layout */
.tbk-step-layout{
    display:grid;
    grid-template-columns:320px 1fr;
    gap:48px;
    align-items:start;
    margin-top:10px;
}

.tbk-sidebar{
    padding-top:4px;
}

.tbk-main{
    min-width:0;
}

/* Summary panel (sidebar) */
.tbk-summary{
    margin:0;
}

.tbk-summary-panel{
    border-left:0;
    padding:0;
}

.tbk-summary-title{
    font-weight:700;
    font-size:16px;
    margin:0 0 12px;
    color:#111827;
}

.tbk-summary-row{
    padding:12px 0;
    border-top:1px solid #e5e7eb;
}

.tbk-summary-row:first-of-type{
    border-top:0;
}

.tbk-summary-label{
    font-size:11px;
    letter-spacing:.05em;
    text-transform:uppercase;
    color:#6b7280;
    margin-bottom:6px;
}

.tbk-summary-value{
    font-size:13px;
    line-height:1.35;
    color:#111827;
    word-break:break-word;
}

.tbk-summary-row--multiline .tbk-summary-value{
    white-space:normal;
}

.tbk-summary-split{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    padding:12px 0;
    border-top:1px solid #e5e7eb;
}

.tbk-summary-total{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 0 0;
    border-top:1px solid #e5e7eb;
    margin-top:10px;
}

.tbk-summary-total-label{
    font-weight:700;
    font-size:13px;
    color:#111827;
}

.tbk-summary-total-value{
    font-weight:800;
    font-size:15px;
    color:#111827;
}

/* Vehicles list (Step 2) */
.tbk-vehicles{
    gap:16px;
}

.tbk-vehicles--list{
    display:flex;
    flex-direction:column;
    gap:26px;
}

.tbk-vehicles--list .tbk-vehicle-card{
    background:transparent;
    border-radius:0;
    border:none;
    border-top:1px solid #e5e7eb;
    padding:18px 0;
    display:grid;
    grid-template-columns:260px 1fr 170px;
    align-items:center;
    column-gap:24px;
}

.tbk-vehicles--list .tbk-vehicle-card:first-child{
    border-top:0;
}

.tbk-vehicle-card.tbk-selected{
    box-shadow:none;
    transform:none;
}

.tbk-vehicle-image{
    width:100%;
}

.tbk-vehicle-image img{
    width:100%;
    height:auto;
    display:block;
    border-radius:8px;
    object-fit:cover;
}

.tbk-vehicle-body{
    padding:0;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.tbk-vehicle-name{
    font-size:16px;
    font-weight:700;
    color:#111827;
}

.tbk-vehicle-price{
    font-size:28px;
    font-weight:800;
    line-height:1;
    color:#111827;
}

.tbk-vehicle-meta{
    display:flex;
    align-items:center;
    gap:16px;
    padding-top:2px;
    color:#6b7280;
    font-size:12px;
}

.tbk-vehicle-meta-item{
    display:flex;
    align-items:baseline;
    gap:6px;
    border:1px solid #e5e7eb;
    border-radius:999px;
    padding:6px 10px;
    background:#f9fafb;
}

.tbk-vehicle-meta-num{
    font-weight:800;
    color:#111827;
}

.tbk-vehicle-actions{
    display:flex;
    justify-content:flex-end;
}

.tbk-vehicle-actions .tbk-select-vehicle{
    width:auto;
    min-width:120px;
    padding:10px 16px;
    border-radius:999px;
    border:none;
    background:#111827;
    color:#fff;
    cursor:pointer;
    font-size:13px;
    letter-spacing:.02em;
    text-transform:uppercase;
}

/* Step 3 form grid */
.tbk-form-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:18px 22px;
}

.tbk-colspan-2{
    grid-column:1 / -1;
}

/* Payment cards */
.tbk-payment-cards{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.tbk-payment-card{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    border-radius:10px;
    border:1px solid #d1d5db;
    background:#f9fafb;
    cursor:pointer;
    font-size:13px;
}

.tbk-payment-card input{
    margin:0;
}

/* Buttons */
.tbk-step-actions{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-top:8px;
}

/* Step 1: only Next button -> align right */
.tbk-step[data-step="1"] .tbk-step-actions{
    justify-content:flex-end;
}

/* Step 2: selection jumps to step 3, so hide the "Enter contact details" button */
.tbk-step[data-step="2"] .tbk-next-step[data-next="3"]{
    display:none !important;
}
.tbk-step[data-step="2"] .tbk-step-actions{
    justify-content:flex-start;
}

.tbk-step-actions button{
    padding:12px 18px;
    border-radius:999px;
    border:none;
    font-size:13px;
    cursor:pointer;
}

.tbk-step-actions .tbk-prev-step{
    background:#e5e7eb;
}

#tbk_submit,
.tbk-next-step{
    background:#111827;
    color:#fff;
}

/* Distances */
.tbk-distance-info{
    margin-top:10px;
}
.tbk-distance-info p{
    margin:0;
    font-size:13px;
    color:#374151;
}

/* Responsive */
@media (max-width: 980px){
    #tbk-booking-wrapper{
        max-width:980px;
        padding:18px;
    }
    .tbk-steps-nav{
        gap:30px;
    }
    .tbk-step-layout{
        grid-template-columns:1fr;
        gap:22px;
    }
    .tbk-vehicles--list .tbk-vehicle-card{
        grid-template-columns:1fr;
        row-gap:14px;
    }
    .tbk-vehicle-actions{
        justify-content:flex-start;
    }
}

/* Mobile / small tablets: hide stepper 1/2/3 completely */
@media (max-width: 820px){
    .tbk-steps-nav{ display:none !important; }

    /* Mobile/tablet: keep Child Seats close to Transfer Type */
    .tbk-child-transfer-row{
        flex-direction:column;
        align-items:stretch;
        gap:12px;
    }
    .tbk-child-transfer-row .tbk-field-group:first-child,
    .tbk-child-transfer-row .tbk-field-group:last-child{
        flex:1 1 auto;
        max-width:100%;
        min-width:0;
    }
    .tbk-child-transfer-row .tbk-radio-group{
        margin-top:4px;
        gap:14px;
    }

}

/* ================================
   RETUȘ 9 — Desktop alignment + guaranteed mobile stacking
   Goal:
   - On desktop: Transfer Type aligned with Child Seats (top-aligned, same row)
   - On mobile: Transfer Type sits immediately under Child Seats (no huge gap)
   ================================ */

/* Desktop/tablet: keep both blocks on the same row and align to the top.
   This avoids the large empty area created when Child Seats contains an extra <small> line. */
.tbk-step[data-step="1"] .tbk-flex-row.tbk-child-transfer-row{
    flex-wrap:nowrap !important;
    align-items:flex-start !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:first-child{
    flex:0 0 320px !important;
    max-width:320px !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:last-child{
    flex:1 1 auto !important;
    min-width:0 !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-radio-group{
    margin-top:6px !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group small{
    display:block;
    margin-top:6px;
}

/* Mobile: stack tightly, full width, no fixed widths/min-widths from desktop rules */
@media (max-width: 820px){
    .tbk-step[data-step="1"] .tbk-flex-row.tbk-child-transfer-row{
        flex-direction:column !important;
        flex-wrap:nowrap !important;
        gap:10px !important;
        align-items:stretch !important;
    }

    .tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:first-child,
    .tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:last-child{
        width:100% !important;
        max-width:100% !important;
        flex:1 1 auto !important;
        min-width:0 !important;
    }

    .tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-radio-group{
        margin-top:4px !important;
    }
}

@media (max-width: 640px){
    #tbk-booking-wrapper{
        margin:20px auto;
        padding:14px;
        border-radius:12px;
    }
    .tbk-flex-row{
        flex-direction:column;
    }

    /* Mobile: keep Child Seats close to Transfer Type (avoid large vertical gaps) */
    .tbk-child-transfer-row{
        flex-direction:column;
        align-items:stretch;
        gap:12px;
    }
    .tbk-child-transfer-row .tbk-field-group:first-child,
    .tbk-child-transfer-row .tbk-field-group:last-child{
        flex:1 1 auto;
        max-width:100%;
        min-width:0;
    }
    .tbk-child-transfer-row .tbk-radio-group{
        margin-top:4px;
        gap:14px;
    }
    .tbk-form-grid{
        grid-template-columns:1fr;
    }
    .tbk-colspan-2{
        grid-column:auto;
    }
}


/* ================================
   RETUȘ 3 — Step 1 sizing + layout
   ================================ */

/* Step 1: make fields "shorter" in page but thicker (height already set above) */
.tbk-step[data-step="1"] .tbk-step1-wrap{
    max-width: 980px;
    margin: 0 auto;
    position: relative;
}

/* Center the "+" between Pickup and Dropoff and make it slightly bigger */
.tbk-add-stop-row{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    margin:10px 0 14px;
}
.tbk-add-stop{
    width:42px;
    height:42px;
    border-radius:999px;
    font-size:22px;
    line-height:1;
}

/* Child seats + Transfer type on the same row */
.tbk-child-transfer-row{
    align-items:flex-end;
}
.tbk-child-transfer-row .tbk-field-group:first-child{
    flex:0 0 360px;
    max-width:360px;
}
.tbk-child-transfer-row .tbk-field-group:last-child{
    flex:1;
}

/* Make transfer type options inline (One way / Return) */
.tbk-child-transfer-row .tbk-radio-group{
    flex-direction:row;
    gap:18px;
    margin-top:8px;
}
.tbk-child-transfer-row .tbk-radio-group label{
    white-space:nowrap;
}

/* Ensure Step 1 "Next" stays right */
.tbk-step[data-step="1"] .tbk-step-actions{
    justify-content:flex-end !important;
}

/* Step 3: force checkbox next to text (avoid theme width:100% on inputs) */
.tbk-terms-label{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px;
}

/* ================================
   RETUȘ 8 — Mobile: eliminate big gap between Child Seats and Transfer Type
   IMPORTANT: must override the global (desktop) sizing rules above.
   ================================ */
@media (max-width: 820px){
    /* Force the wrapper row to stack tightly */
    .tbk-flex-row.tbk-child-transfer-row,
    .tbk-child-transfer-row{
        display:flex !important;
        flex-direction:column !important;
        align-items:stretch !important;
        gap:10px !important;
        flex-wrap:nowrap !important;
    }

    /* Make both blocks full width so Transfer Type comes immediately after Child Seats */
    .tbk-child-transfer-row .tbk-field-group:first-child,
    .tbk-child-transfer-row .tbk-field-group:last-child{
        flex:1 1 auto !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
    }

    /* Reduce any vertical spacing inside the transfer block */
    .tbk-child-transfer-row .tbk-radio-group{
        margin-top:4px !important;
        gap:14px !important;
    }

    /* Keep the distance label close (no extra margins from themes) */
    .tbk-distance-info{ margin-top:8px !important; }
}

/* ================================
   RETUȘ 10 — FINAL OVERRIDE (must stay LAST in file)
   Forces Transfer Type to sit right next to Child Seats on desktop,
   and immediately under Child Seats on mobile (no scroll gap).
   ================================ */

.tbk-step[data-step="1"] .tbk-flex-row.tbk-child-transfer-row{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:flex-start !important;
    gap:16px !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:first-child{
    flex:0 0 320px !important;
    width:320px !important;
    max-width:320px !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:last-child{
    flex:1 1 auto !important;
    min-width:0 !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-radio-group{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:16px !important;
    margin-top:6px !important;
}

.tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group small{
    display:block !important;
    margin-top:6px !important;
}

@media (max-width: 820px){
    .tbk-step[data-step="1"] .tbk-flex-row.tbk-child-transfer-row{
        flex-direction:column !important;
        flex-wrap:nowrap !important;
        align-items:stretch !important;
        gap:10px !important;
    }

    .tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:first-child,
    .tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-field-group:last-child{
        width:100% !important;
        max-width:100% !important;
        flex:1 1 auto !important;
        min-width:0 !important;
    }

    .tbk-step[data-step="1"] .tbk-child-transfer-row .tbk-radio-group{
        margin-top:4px !important;
    }
}
