/* iOS-Style Picker Component */

.picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.picker-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.picker-container {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.picker-modal.active .picker-container {
    transform: translateY(0);
}

/* Picker Header */
.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.picker-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.picker-back-btn {
    background: none;
    border: none;
    color: #4a6da7;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.picker-back-btn:hover {
    opacity: 0.7;
}

.picker-done-btn {
    background: #4a6da7;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 8px;
}

.picker-done-btn:hover {
    background: #3a5a97;
}

.picker-done-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Picker Wheels Container */
.picker-wheels {
    display: flex;
    gap: 10px;
    padding: 20px;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Selection Highlight */
.picker-wheels::before {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 44px;
    background: rgba(74, 109, 167, 0.1);
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

/* Individual Picker Wheel */
.picker-wheel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 2;
}

.picker-wheel::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Padding items for centering */
.picker-spacer {
    height: calc(50% - 22px);
    flex-shrink: 0;
}

/* Picker Items */
.picker-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #666;
    scroll-snap-align: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.picker-item.selected {
    color: #333;
    font-weight: 600;
}

.picker-item:hover {
    color: #4a6da7;
}

/* Wheel Labels */
.picker-labels {
    display: flex;
    gap: 10px;
    padding: 0 20px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.picker-label {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Desktop styles */
@media screen and (min-width: 769px) {
    .picker-modal {
        align-items: center;
    }

    .picker-container {
        border-radius: 20px;
        max-height: 500px;
        transform: scale(0.9);
        opacity: 0;
    }

    .picker-modal.active .picker-container {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile optimizations */
@media screen and (max-width: 768px) {
    .picker-wheels {
        padding: 15px;
    }

    .picker-wheels::before {
        left: 15px;
        right: 15px;
    }

    .picker-item {
        font-size: 0.95rem;
    }
}
