/* ===== Custom Select Picker (Bottom Sheet) ===== */

.picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: pickerFadeIn 0.15s ease;
}

.picker-sheet {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    animation: pickerSlideUp 0.25s ease;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.picker-handle {
    width: 36px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 0;
}

.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
}

.picker-title {
    font-weight: 600;
    font-size: 1rem;
    color: #222;
    font-family: 'Prompt', 'Sarabun', sans-serif;
}

.picker-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.picker-search {
    padding: 0 16px 10px;
}

.picker-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.picker-search input:focus {
    border-color: #e51c23;
}

.picker-search input::placeholder {
    color: #bbb;
}

.picker-options {
    overflow-y: auto;
    padding: 0 0 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.picker-option {
    padding: 13px 20px;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.12s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Prompt', 'Sarabun', sans-serif;
}

.picker-option:last-child {
    border-bottom: none;
}

.picker-option:active {
    background: #fff0f0;
}

.picker-option.active {
    color: #e51c23;
    font-weight: 600;
    background: #fff5f5;
}

.picker-option.active::before {
    content: '✓';
    font-weight: 700;
    color: #e51c23;
    font-size: 0.9rem;
}

.picker-empty {
    padding: 30px 20px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    font-family: 'Prompt', 'Sarabun', sans-serif;
}

/* ===== Animations ===== */
@keyframes pickerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pickerFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes pickerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pickerSlideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}
