/* Main Wrapper */
.cb-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Poppins', 'Inter', 'Roboto', sans-serif;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

/* Steps */
.cb-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    border-bottom: 2px solid #f1f5f9;
}

.cb-step {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-weight: 600;
    color: #94a3b8;
    cursor: default;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.cb-step.active {
    color: var(--cb-primary, #0073aa);
    border-bottom: 3px solid var(--cb-primary, #0073aa);
    font-weight: 700;
}

/* Form Layout */
.cb-step-content {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cb-step-content.active {
    display: block;
}

.cb-flex-row {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.cb-input-group {
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
}

/* Pickup field: inline Add Stop button */
.cb-input-with-btn {
    position: relative;
    display: flex;
    align-items: center;
}

.cb-input-with-btn input {
    width: 100%;
    padding-right: 110px !important;
    /* reserve space for the button */
}

.cb-add-stop-inline {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid var(--cb-primary, #0073aa);
    color: var(--cb-primary, #0073aa);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
}

.cb-add-stop-inline:hover {
    background: var(--cb-primary, #0073aa);
    color: #fff;
}

.cb-add-stop-inline span {
    font-size: 16px;
    line-height: 1;
}

/* +/- Counter for passengers & suitcases */
.cb-counter {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    height: 50px;
}

.cb-counter input[type="number"] {
    flex: 1;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    padding: 0 !important;
    box-shadow: none !important;
    -moz-appearance: textfield;
    appearance: textfield;
    width: auto;
}

.cb-counter input[type="number"]::-webkit-inner-spin-button,
.cb-counter input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cb-counter input:focus {
    outline: none;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.cb-counter-btn {
    background: #fff;
    border: none;
    border-radius: 0;
    width: 44px;
    height: 100%;
    font-size: 20px;
    font-weight: 400;
    color: var(--cb-primary, #0073aa);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.cb-counter-btn:first-child {
    border-right: 1px solid #e2e8f0;
}

.cb-counter-btn:last-child {
    border-left: 1px solid #e2e8f0;
}

.cb-counter-btn:hover {
    background: var(--cb-primary, #0073aa);
    color: #fff;
}

.cb-counter-btn:active {
    filter: brightness(0.9);
}

.cb-col-2 {
    flex: 1 1 45%;
}

/* Inputs */
.cb-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
    font-size: 14px;
}

.cb-wrapper input[type="text"],
.cb-wrapper input[type="email"],
.cb-wrapper input[type="date"],
.cb-wrapper input[type="time"],
.cb-wrapper input[type="number"],
.cb-wrapper textarea {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #f8fafc;
    color: #1e293b;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.cb-wrapper input:focus,
.cb-wrapper textarea:focus {
    border-color: var(--cb-primary, #0073aa);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.1);
}

/* Map */
#cb-map-canvas {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Cars Grid */
.cb-cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.cb-car-card {
    display: block;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cb-car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.cb-car-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cb-car-card:has(.cb-car-radio:checked) {
    border-color: var(--cb-primary, #0073aa);
    box-shadow: 0 0 0 2px var(--cb-primary, #0073aa), 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.cb-car-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cb-car-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #f1f5f9;
}

.cb-no-img {
    height: 180px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 500;
}

.cb-car-info {
    padding: 20px;
    flex-grow: 1;
}

.cb-car-info h4 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.cb-car-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

.cb-car-features li {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.cb-car-features li::before {
    content: "✓";
    color: var(--cb-primary, #0073aa);
    font-weight: 800;
    margin-right: 8px;
    font-size: 12px;
}

.cb-car-price {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    color: var(--cb-primary, #0073aa);
    font-weight: 700;
    font-size: 18px;
    text-align: right;
}

/* Extras */
.cb-extras-list {
    display: grid;
    gap: 12px;
}

.cb-extra-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.cb-extra-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cb-extra-item:has(input:checked) {
    border-color: var(--cb-primary, #0073aa);
    background: #eff6ff;
}

.cb-extra-item input {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: var(--cb-primary, #0073aa);
}

/* Buttons */
.cb-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.cb-btn {
    padding: 16px 36px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cb-btn-next,
.cb-btn-submit {
    background: var(--cb-primary, #0073aa);
    color: #fff;
    margin-left: auto;
}

.cb-btn-submit:hover,
.cb-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    filter: brightness(1.1);
}

.cb-btn-next:disabled,
.cb-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cb-btn-prev {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cb-btn-prev:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

/* Radio Groups */
.cb-radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cb-radio-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    margin: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cb-radio-group label:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.cb-radio-group label:has(input:checked) {
    background: var(--cb-primary, #0073aa);
    color: #fff;
    border-color: var(--cb-primary, #0073aa);
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.25);
}

.cb-radio-group input {
    margin: 0 8px 0 0;
    accent-color: #fff;
}

/* Payment Methods */
.cb-payment-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.cb-payment-method {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
    font-weight: 500;
}

.cb-payment-method:has(input:checked) {
    border-color: var(--cb-primary, #0073aa);
    background: #eff6ff;
    color: var(--cb-primary, #0073aa);
    box-shadow: inset 0 0 0 1px var(--cb-primary, #0073aa);
}

.cb-payment-method input {
    margin-right: 10px;
}

/* Total Summary */
.cb-total-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-top: 40px;
    border: 1px solid #e2e8f0;
}

.cb-total-summary h3 {
    margin: 0;
    color: #1e293b;
    font-size: 26px;
    font-weight: 700;
}

.cb-price-breakdown {
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px dashed #cbd5e1;
}

.cb-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

/* Utilities */
.cb-hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -- RESPONSIVE MEDIA QUERIES -- */

@media screen and (max-width: 768px) {
    .cb-wrapper {
        padding: 20px;
        margin: 20px auto;
        border-radius: 15px;
    }

    /* Steps horizontal scroll on small screens */
    .cb-steps {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 0;
        margin-bottom: 25px;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .cb-steps::-webkit-scrollbar {
        display: none;
    }

    .cb-step {
        padding: 10px 20px;
        flex: 0 0 auto;
        font-size: 12px;
    }

    .cb-flex-row {
        gap: 15px;
        margin-bottom: 15px;
    }

    .cb-input-group,
    .cb-col-2 {
        flex: 1 1 100%;
    }

    .cb-nav-buttons {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .cb-btn {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }

    .cb-cars-grid {
        grid-template-columns: 1fr;
    }

    /* Improve touch targets */
    .cb-wrapper input,
    .cb-wrapper select,
    .cb-wrapper textarea {
        font-size: 16px;
        /* Prevents iOS zoom */
        padding: 14px;
    }

    .cb-car-img img {
        height: 200px;
    }

    .cb-payment-options {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .cb-wrapper {
        padding: 15px;
        box-shadow: none;
        border: none;
    }

    .cb-steps {
        border-bottom: 1px solid #e2e8f0;
    }

    h3 {
        font-size: 1.25rem;
    }

    .cb-car-price {
        font-size: 16px;
        padding: 12px 15px;
    }
}
input[type="text"], input[type="number"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type=reset], input[type=tel], input[type=date], select {
    min-height: 60px !important;
}