/* 
   Rentuj Picker Overlay System
   Provides a completely isolated screen for selecting brands, models, etc.
*/

:root {
    --picker-z-index: 99999999;
    --picker-bg: #ffffff;
    --picker-backdrop: rgba(15, 23, 42, 0.6);
    --picker-primary: #0045A5;
    --picker-text: #1e293b;
    --picker-muted: #64748b;
    --picker-border: #e2e8f0;
}

/* Base Overlay */
#rentuj-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--picker-z-index);
    background: transparent;
    display: none; /* Controlled by JS */
    opacity: 0;
    transition: opacity 0.2s ease;
}

#rentuj-picker-overlay.active {
    display: block;
    opacity: 1;
}

/* Centered Container */
.rentuj-picker-card {
    background: var(--picker-bg);
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 280px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--picker-border);
    transform: translateY(-10px);
    transition: transform 0.2s ease, opacity 0.2s ease;
    overflow: hidden;
    position: absolute; /* Set by JS */
    opacity: 0;
    z-index: calc(var(--picker-z-index) + 1);
}

#rentuj-picker-overlay.active .rentuj-picker-card {
    transform: translateY(0);
    opacity: 1;
}

/* Header Section */
.picker-header {
    padding: 8px 10px;
    border-bottom: 1px solid var(--picker-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.picker-header h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--picker-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.picker-close {
    background: #f1f5f9;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--picker-muted);
    transition: all 0.2s;
}

.picker-close:hover {
    background: #e2e8f0;
    color: #ef4444;
}

/* Search Area */
.picker-search-wrapper {
    padding: 6px 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--picker-border);
    position: relative;
}

.picker-search-input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--picker-border);
    border-radius: 6px;
    padding: 6px 10px 6px 28px;
    font-size: 12px;
    font-weight: 500;
    color: var(--picker-text);
    outline: none;
    transition: border-color 0.2s;
}

.picker-search-wrapper i.fa-magnifying-glass {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--picker-muted);
    font-size: 11px;
}

.picker-search-input:focus {
    border-color: var(--picker-primary);
}

/* List Items */
.picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
}

.picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
    color: var(--picker-text);
    font-weight: 500;
    font-size: 12px;
}

.picker-item:hover {
    background: #f1f5f9;
    color: var(--picker-primary);
}

.picker-item.selected {
    background: #eff6ff;
    color: var(--picker-primary);
    font-weight: 700;
}

.picker-item-count {
    background: #f1f5f9;
    color: var(--picker-muted);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 100px;
    min-width: 24px;
    text-align: center;
}

.picker-item.selected .picker-item-count {
    background: var(--picker-primary);
    color: #fff;
}

/* Removed Mobile Fullscreen Override */

/* No Results */
.picker-no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--picker-muted);
    font-size: 14px;
}
