/* ============================================
   iOS-STYLE WHEEL DATE PICKER
   Version: 1.0
   
   Кастомный date picker с тремя барабанами:
   День | Месяц | Год
   
   Полная локализация (ru/uk/en)
   ============================================ */

/* Overlay */
.wheel-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.wheel-picker-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container */
.wheel-picker-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: #1c1c1e;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 90vh;
    overflow: hidden;
    
    /* Safe area для iPhone */
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.wheel-picker-container.active {
    transform: translateY(0);
}

/* Header */
.wheel-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wheel-picker-title {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    flex: 1;
}

.wheel-picker-btn {
    padding: 8px 12px;
    background: none;
    border: none;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
    min-width: 70px;
}

.wheel-picker-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.wheel-picker-cancel {
    color: rgba(255, 255, 255, 0.6);
}

.wheel-picker-done {
    color: #007aff;
    font-weight: 600;
}

/* Wheels Container */
.wheel-picker-wheels {
    display: flex;
    height: 216px;
    position: relative;
    padding: 0 8px;
}

/* Selection Highlight */
.wheel-picker-wheels::before {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    height: 36px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

/* Individual Wheel */
.wheel-column {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Month column slightly wider */
.wheel-column.month-column {
    flex: 1.4;
}

.wheel-scroll {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wheel-scroll::-webkit-scrollbar {
    display: none;
}

/* Wheel Items */
.wheel-item {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.wheel-item.selected {
    color: #ffffff;
    font-weight: 500;
}

.wheel-item.disabled {
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

/* Spacers for scroll padding */
.wheel-spacer {
    height: 90px; /* (216 - 36) / 2 */
    flex-shrink: 0;
}

/* Fade Gradients */
.wheel-column::before,
.wheel-column::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 72px;
    pointer-events: none;
    z-index: 2;
}

.wheel-column::before {
    top: 0;
    background: linear-gradient(to bottom, #1c1c1e 20%, transparent);
}

.wheel-column::after {
    bottom: 0;
    background: linear-gradient(to top, #1c1c1e 20%, transparent);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 380px) {
    .wheel-picker-header {
        padding: 10px 12px;
    }
    
    .wheel-picker-btn {
        font-size: 15px;
        min-width: 60px;
        padding: 6px 10px;
    }
    
    .wheel-picker-title {
        font-size: 15px;
    }
    
    .wheel-item {
        font-size: 18px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes wheelPickerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes wheelPickerSlideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}