/* Header h1 spacing */
h1{
    margin-top: 2px;
    margin-bottom: 8px;
}
/* Hide the burger menu by default; JS will show it for authenticated users */
.userHamburger {
    display: none;
}
/* Shared logo/menu bar styles for all customer pages */
.logoWrap {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 16px auto;
    background: #1783e0;
    border-radius: 0 0 12px 12px;
}
.logoWrap img {
    width: 100%;
    max-width: 600px;
    display: block;
}
.userHamburger {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: transparent;
    border: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.userHamburger span.burger-bar {
    display: block;
    width: 44px;
    min-height: 7px;
    height: 7px !important;
    background: #fff;
    border-radius: 4px;
    margin: 4px 0;
}
.userHamburger span.menu-label {
    display: block;
    color: #fff;
    font-weight: 500;
    font-size: 1.08em;
    margin-top: 2px;
    letter-spacing: 0.5px;
    width: 44px;
    text-align: center;
}
body {
    font-family: Arial, sans-serif;
    padding: 20px;
}
#map {
    /* no padding here to avoid interfering with the map rendering */
    padding: 0;
    width: 100%;
    margin-top: 0px;
    height: 400px;
    min-height: 300px;
    background: #eaeaea;
}
input[type="text"] {
    max-width: 600px;
    width: 400px;
    padding-right: 30px;
    font-size: 16px;
}

/* Prevent iOS zoom on focus for all text-entry fields */
textarea,
select,
.address-input,
input[type="date"],
input[type="time"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"] {
    font-size: 16px;
}
.clear-button {
    position: absolute;
    right: -10px;
    top: 45%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: gray;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    display: none;
}
input[type="text"]:focus + .clear-button,
input[type="text"]:not(:placeholder-shown) + .clear-button {
    display: block;
}
.clearSecondModal-button {
    position: absolute;
    right: -30px;
    top: 45%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: gray;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    display: none;
}
input[type="text"]:focus + .clearSecondModal-button,
input[type="text"]:not(:placeholder-shown) + .clearSecondModal-button {
    display: block;
}
#price {
    font-size: 1em;
    margin-top: -3px;
}
#estimatedDistance, #estimatedDuration {
    font-size: 0.6em;
    margin: 0;
}
button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
}
button:hover {
    background-color: #45a049;
}

/* quick visual flash to confirm clicks (used by admin View buttons) */
@keyframes btn-flash {
    0% { transform: translateY(0); box-shadow: 0 0 0 rgba(11,95,255,0); }
    30% { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 18px rgba(11,95,255,0.12); }
    100% { transform: translateY(0); box-shadow: 0 0 0 rgba(11,95,255,0); }
}
.btn-flash {
    animation: btn-flash 320ms ease-in-out;
}
.luggage-options {
    display: none;
    margin-top: -12px;
}
.luggage-options label {
    margin-right: 10px;
}
.schedule-options {
    margin-top: -20px;
}
.hidden {
    display: none;
}
.schedule-header {
    font-size: 1.2em;
    margin-top: 4px;
}
.error-message {
    color: red;
    font-size: 0.8em;
}
.flex-container {
    display: flex;
    gap: 0px;
}
.modal {
    display: none;
    position: fixed;
    /* high base z-index so overlays reliably cover any other fixed elements */
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    /* ensure the modal overlay blocks pointer events to elements underneath */
    pointer-events: auto;
    touch-action: none;
    /* center dialog contents when JS sets display:flex */
    align-items: center;
    justify-content: center;
    /* hidden by default; JS will set inline style display='flex' when opening a modal */
    display: none;
}
/* Put ride/dialogs above almost everything else to avoid stacking issues */
.ride-modal { z-index: 100000; }
.driver-modal { z-index: 110000; }
/* Ensure dialog inner content is on top of the overlay and accepts pointer events */
.modal .dialog { pointer-events: auto; position: relative; /* ensure dialog sits above the overlay and other content */ z-index: 100001; }
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.modal-info {
    color: #999; 
    font-size: 70%; 
}
.emoji-button {
    background: transparent; 
    border: none; 
    font-size: 14px; 
    cursor: pointer; 
    display: none; 
    margin-left: 10px; 
}
.set-location-button {
    display: none; 
    background: none; 
    border: none; 
    color: #4CAF50; 
    cursor: pointer; 
    font-size: 14px; 
    margin-top: 5px; 
}
#secondMap {
    height: 600px;
    width: 100%;
    margin-top: 20px; 
}
#secondModal input[type="text"] {
    width: 100%; 
    box-sizing: border-box; 
    margin-bottom: 10px; 
}
.vehicleTypeBtn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #333;
    color: #fff;
    border-radius: 6px;
    border: 2px solid #888;
    font-size: 1em;
    padding: 10px 12px;
    cursor: pointer;
}
.vehicleTypeBtn.selected {
    background: #222;
    border-color: #4CAF50;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* custV2 toolbar classes */
.custv2-toolbar-label { margin-left: 8px; display:flex; align-items:center; gap:6px; }
.custv2-filter-input { width:120px; padding:6px; margin-left:6px; }
.custv2-filter-zip { width:80px; padding:6px; margin-left:6px; }
.custv2-active-select { padding:6px; margin-left:6px; }
.custv2-hasrides { margin-left:6px; display:flex; align-items:center; gap:6px; }
.custv2-pager-footer { padding:8px; text-align:right; }
.custv2-list-footer { padding:8px; text-align:right; }

/* Filters panel and active-filter badges (match rides look) */
.filters-panel {
    background: #f2f2f2 !important; /* solid light grey background */
    border: 1px solid #d0d7dd !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 10px;
    min-width: 320px;
}
.filter-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: #e8f0ff !important; /* light-blue pill */
    border: 1px solid #c7d8ff !important;
    color: #0b4f9a !important;
    padding: 6px 12px;
    margin-right: 8px;
    margin-bottom: 6px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
    flex: 0 0 auto !important;
    width: auto !important;
    white-space: nowrap !important;
}
.filter-badge select, .filter-badge input { border: none !important; background: transparent !important; color: inherit !important; font-size: inherit !important; padding: 0 !important; margin: 0 !important; }
.filter-badge select { width: auto !important; min-width: 40px !important; }
.filter-clear { color: #0b4f9a !important; cursor: pointer; font-weight: 600; padding-left:6px }
.active-filters { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* Autosize and compact inputs inside filter badges */
.filter-badge input[type="text"] {
    border: none !important;
    background: transparent !important;
    padding: 0 4px !important;
    margin: 0 !important;
    font-size: 12px !important;
    color: inherit !important;
    min-width: 28px !important; /* small affordance when empty */
    max-width: 320px !important; /* cap to avoid overflowing toolbar */
    width: auto !important; /* will be set by JS */
}
.filter-badge .filter-input-wrap { display:inline-block; vertical-align:middle; overflow:visible; }

.filter-edit { color: #0b4f9a !important; cursor: pointer; font-weight: 600; padding-left:4px; margin-left:4px; }
.filter-edit:hover { color: #083a6e !important; }


/* badge styles used in admin UI */
.status-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; margin-left:8px; vertical-align:middle; }
.badge-paid { background:#e6fbef; color:#067a3d; border:1px solid #b6f0c8 }
.badge-pending { background:#fff7e6; color:#8a5a00; border:1px solid #ffe9b3 }
.badge-failed { background:#fdecea; color:#a4281a; border:1px solid #f7c5c2 }
.badge-unknown { background:#f3f4f6; color:#666; border:1px solid #e6e7ea }
.badge-processing { background:#fff2cc; color:#8a5a00; border:1px solid #ffe08a }
.badge-refunded { background:#e8f7ff; color:#005b8a; border:1px solid #cfeefe }
.badge-searching { background:#e8f0ff; color:#0b5fff; border:1px solid #d6e4ff }
.badge-enroute { background:#fff3e0; color:#ff9800; border:1px solid #ffe0b2 }
.badge-waiting { background:#f3e8ff; color:#6a1b9a; border:1px solid #eadbff }
.badge-withdriver { background:#e6fbef; color:#067a3d; border:1px solid #b6f0c8 }
.badge-completed { background:#e8f7ff; color:#005b8a; border:1px solid #cfeefe }

/* ride detail modal header lines */
.rdm-title-line { font-size:1.05em; font-weight:600; color:#222; line-height:1.15; }

/* ride driver photo */
.rdm-driver-photo { width:56px; height:56px; border-radius:8px; object-fit:cover; background:#f3f4f6; display:block; }


/* Admin tab buttons: ensure text is visible even though generic `button` is white */
.tab-button {
    background: #fafafa; /* light background used in admin.html */
    color: #222 !important; /* dark text for readability */
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.tab-button:hover { background: #f0f4ff; }
.tab-button.active {
    background: #0b5fff !important;
    color: #fff !important;
    border-color: #084ed3 !important;
    box-shadow: 0 4px 10px rgba(11,95,255,0.12);
}
.tab-button[disabled], .tab-button.disabled { color: #999 !important; opacity: 0.8; cursor: default; }

