/* =============================================================
   CAB UI - cab-ui.css
   All cab booking frontend styles
   ============================================================= */

/* -------------------------------------------------------
   CAB CUSTOM DROPDOWN
   ------------------------------------------------------- */
.cab-custom-select {
    position: relative;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

.cab-custom-select__trigger {
    display: flex;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    gap: 0;
    min-width: 0;
}

.cab-custom-select__trigger .cs-value {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.cab-custom-select__trigger .cs-value.placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

/* Dropdown Panel */
.cab-custom-select__panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 20px 60px -10px rgba(4, 44, 97, 0.15), 0 8px 24px rgba(0,0,0,0.06);
    z-index: 9999;
    overflow: hidden;
    margin-top: 6px;
    transform-origin: top center;
}

@keyframes csDropIn {
    from { opacity: 0; transform: scaleY(0.92) translateY(-4px); }
    to   { opacity: 1; transform: scaleY(1)   translateY(0); }
}

.cab-custom-select__panel.open {
    display: block;
    animation: csDropIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Search box inside panel */
.cab-custom-select__search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #F3F4F6;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.cab-custom-select__search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.8125rem;
    color: #111827;
    background: transparent;
    font-family: inherit;
}

.cab-custom-select__search input::placeholder { color: #9CA3AF; }

/* Options list */
.cab-custom-select__options {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 0;
}

.cab-custom-select__options::-webkit-scrollbar { width: 4px; }
.cab-custom-select__options::-webkit-scrollbar-track { background: transparent; }
.cab-custom-select__options::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }

.cab-cs-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.cab-cs-option:hover {
    background: #F0FDFC;
    color: #065f46;
}

.cab-cs-option.selected {
    background: #E6F9F8;
    color: #065f46;
    font-weight: 600;
}

.cab-cs-option .cs-opt-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D1D5DB;
    flex-shrink: 0;
    transition: background 0.12s ease;
}

.cab-cs-option.selected .cs-opt-dot,
.cab-cs-option:hover .cs-opt-dot {
    background: #065f46;
}

/* No results message */
.cab-cs-no-results {
    padding: 16px;
    text-align: center;
    font-size: 0.8125rem;
    color: #9CA3AF;
}

/* Arrow icon */
.cs-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* Field wrap — allow panel to overflow */
.cab-field-wrap {
    overflow: visible !important;
}

/* Add highlight to field wrap when active (via JS inline styles) */
.cab-field-wrap:has(.cab-custom-select.is-open) {
    border-color: #065f46 !important;
    box-shadow: 0 0 0 3px rgba(0, 41, 94, 0.08);
}

/* Outer column wrapper — positioning context for the panel */
.cab-cs-col {
    position: relative;
}
