/* ============================================
   24/7 DD — Client Booking Modular CSS
   Namespace: cb-
   ============================================ */

/* ====== Global Reset ====== */
*, *::before, *::after {
    box-sizing: border-box !important;
}

/* ====== Sections ====== */
.cb-section {
    background: #101622;
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

.cb-title {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 700;
    color: #00ff88;
}

/* ====== Layout ====== */
.cb-row-2 {
    display: grid;
    grid-template-columns: 0.7fr 0.7fr;
    gap: 14px;
}

.cb-row-addr {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ====== Fields ====== */
.cb-field label {
    color: #c0c0c0;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.cb-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #283247;
    border-radius: 8px;
    background: #0f1522;
    color: #ffffff;
    font-size: 14px;
    transition: 0.2s;
}

.cb-field input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0,255,136,0.3);
}

/* ====== Inline label + input ====== */
.cb-field-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.cb-field-inline label {
    margin: 0;
    white-space: nowrap;
}

.cb-field-inline input {
    flex: 1;
}

/* ====== Icon Button (📍) ====== */
.cb-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #00ff88;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #111;
    transition: 0.2s ease;
}

.cb-icon-btn:hover {
    background: #ffd84a;
}

/* ====== Mini Buttons ====== */
.cb-mini-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.cb-smallbtn {
    background: #0f1522;
    border: 2px solid #283247;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.cb-smallbtn:hover {
    border-color: #00ff88;
    background: #182030;
}

/* ====== Pickup Time Buttons ====== */
.cb-row-timeoptions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.cb-time-label {
    background: #0f1522;
    border: 2px solid #283247;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
    user-select: none;
}

.cb-time-label input {
    display: none;
}

.cb-time-label input:checked + span {
    background: #00ff88;
    color: #111;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ====== Payment Buttons ====== */
.cb-payment-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.cb-radio-label {
    flex: 1;
    text-align: center;
    background: #0f1522;
    border: 2px solid #283247;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
}

.cb-radio-label:hover {
    border-color: #00ff88;
}

.cb-radio-label input {
    display: none;
}

.cb-radio-label input:checked + .cb-radio-content {
    background: #00ff88;
    color: #111;
    border-radius: 4px;
    padding: 2px 6px;
    font-weight: 700;
}

/* ====== Help Text ====== */
.cb-help-text {
    margin-top: 10px;
    font-size: 12px;
    color: #c0c0c0;
}

.cb-help-text a {
    color: #00ff88;
}

/* ====== Required Field Red Pulse ====== */
.cb-field input.error {
    border-color: #ff4444 !important;
    box-shadow: 0 0 12px rgba(255, 50, 50, 1) !important;
    animation: cbPulseRed 1s infinite;
}

@keyframes cbPulseRed {
    0%   { box-shadow: 0 0 0 rgba(255,0,0,0.3); }
    50%  { box-shadow: 0 0 12px rgba(255,0,0,1); }
    100% { box-shadow: 0 0 0 rgba(255,0,0,0.3); }
}

/* Prevent Chrome autofill colors */
.cb-field input:-webkit-autofill,
.cb-field input:-webkit-autofill:hover,
.cb-field input:-webkit-autofill:focus,
.cb-field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0f1522 inset !important;
    box-shadow: 0 0 0 1000px #0f1522 inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Client info layout */
.cb-row-2-tight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 430px) {
    .cb-row-2-tight {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
}

/* DARK BACKGROUND */
html, body {
    background: #050608 !important;
    color: #f5f5f5;
}

#map,
.map-panel,
.map-wrapper {
    background: #050608 !important;
}

#cb_pickup_time .cb-row-2 .cb-field {
    max-width: 70%;
}

/* SELECT styling */
.cb-field select.cb-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #283247;
    border-radius: 8px;
    background: #0f1522;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: 0.2s;
}

.cb-field select.cb-input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0,255,136,0.3);
}

.cb-field select.cb-input::-ms-expand {
    display: none;
}

/* ========== Scheduled button disabled look ========== */
.cb-time-label.disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

.cb-time-label.disabled span,
.cb-time-label.disabled input {
    cursor: not-allowed !important;
}

/* FIX: force grey when Scheduled radio is disabled */
#pickup_time_later:disabled + span {
    opacity: 0.35 !important;
    pointer-events: none !important;
}


/* ========== FIXED: Disabled SELECT dropdowns ========== */
select:disabled,
.cb-field select.cb-input:disabled {
    background-color: #222 !important;
    border-color: #444 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    /* opacity removed — FIXES click-blocking bug */
}

/* ========================================================= */
/* ===== ONLY FIX ADDED — NOTHING ELSE CHANGED ============== */
/* ========================================================= */

/* FIX: These two fields MUST be clickable when enabled */
#pickup_date_select:not(:disabled),
#pickup_hour_select:not(:disabled) {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* And MUST NOT be clickable when disabled */
#pickup_date_select:disabled,
#pickup_hour_select:disabled {
    pointer-events: none !important;
    cursor: not-allowed !important;
}


/* ------------------------------
   Submission Checklist
   ------------------------------ */
.runonce-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 14px;
}

.runonce-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #666;
}

.runonce-check.ok {
    background: #00ff88;
    border-color: #00ff88;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.6);
}

/* ------------------------------
   Submit Button
   ------------------------------ */
.cb-submit-btn {
    margin-top: 14px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 700;
    background: #00ff88;
    color: #111;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.45);
}

.cb-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cb-submit-msg {
    margin-top: 10px;
    color: #ff8888;
    font-size: 13px;
}

/* ------------------------------
   Submit + Checklist layout
   ------------------------------ */
#cb_submit {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

#cb_submit .submit-col {
    flex: 0 0 180px;
    text-align: center;
}

#cb_submit #runonce-card {
    flex: 1;
}
