/**
 * iOS-Style Date and Time Picker Styles
 * Apple-style scroll picker imitation
 */

.ios-picker-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px 10px;
    margin: 15px 0;
    overflow: hidden;
}

.ios-picker-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    position: relative;
    height: 220px;
}

.ios-picker-column {
    position: relative;
    overflow: hidden;
}

.ios-picker-options {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 88px 0; /* Space for 2 options above and below */
}

.ios-picker-options::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.ios-picker-option {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    opacity: 0.3;
    transform: scale(0.8);
    cursor: pointer;
}

.ios-picker-option:hover {
    opacity: 0.8;
}

/* Highlight selected area */
.ios-picker-highlight {
    position: absolute;
    top: 55%;
    left: 10px;
    right: 10px;
    height: 44px;
    transform: translateY(-50%);
    background: rgba(102, 126, 234, 0.1);
    border-top: 1px solid rgba(102, 126, 234, 0.3);
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

/* Gradient mask effect */
.ios-picker-column::before,
.ios-picker-column::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 88px;
    pointer-events: none;
    z-index: 2;
}

.ios-picker-column::before {
    top: 0;
    background: linear-gradient(to bottom, 
        rgba(248, 249, 250, 1) 0%,
        rgba(248, 249, 250, 0.8) 50%,
        rgba(248, 249, 250, 0) 100%);
}

.ios-picker-column::after {
    bottom: 0;
    background: linear-gradient(to top, 
        rgba(248, 249, 250, 1) 0%,
        rgba(248, 249, 250, 0.8) 50%,
        rgba(248, 249, 250, 0) 100%);
}

/* Label style */
.ios-picker-label {
    text-align: center;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .ios-picker-wrapper {
        height: 200px;
    }
    
    .ios-picker-option {
        height: 40px;
        font-size: 16px;
    }
    
    .ios-picker-highlight {
        height: 40px;
    }
    
    .ios-picker-options {
        padding: 80px 0;
    }
}

/* Animation effect */
@keyframes pickerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ios-picker-container {
    animation: pickerFadeIn 0.4s ease-out;
}

/* AI interface special style - Override default styles */
.ai-datetime-group .ios-picker-container {
    margin: 0 !important;
    padding: 15px 8px !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
}

.ai-datetime-group .ios-picker-wrapper {
    height: 180px !important;
}

.ai-datetime-group .ios-picker-option {
    font-size: 18px !important;
    height: 42px !important;
    color: #333333 !important;
    font-weight: 500 !important;
    opacity: 0.6 !important;
    transition: all 0.3s ease !important;
}

.ai-datetime-group .ios-picker-option:hover {
    opacity: 0.8 !important;
}

.ai-datetime-group .ios-picker-highlight {
    height: 42px !important;
    background: rgba(102, 126, 234, 0.15) !important;
    border: 2px solid rgba(102, 126, 234, 0.4) !important;
    border-radius: 8px !important;
}

.ai-datetime-group .ios-picker-options {
    padding: 69px 0 !important;
}

/* Optimize column width - Month 35%, Day 15%, Year 25% */
.ai-datetime-group:first-child .ios-picker-wrapper {
    grid-template-columns: 2.33fr 1fr 1.67fr !important;
}

/* Time picker changed to 24-hour format, only 2 columns */
.ai-datetime-group:last-child .ios-picker-wrapper {
    grid-template-columns: 1fr 1fr !important;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .ios-picker-container {
        background: #2c2c2e;
    }
    
    .ios-picker-option {
        color: #ffffff;
    }
    
    .ios-picker-highlight {
        background: rgba(102, 126, 234, 0.2);
        border-color: rgba(102, 126, 234, 0.5);
    }
    
    .ios-picker-column::before {
        background: linear-gradient(to bottom, 
            rgba(44, 44, 46, 1) 0%,
            rgba(44, 44, 46, 0.8) 50%,
            rgba(44, 44, 46, 0) 100%);
    }
    
    .ios-picker-column::after {
        background: linear-gradient(to top, 
            rgba(44, 44, 46, 1) 0%,
            rgba(44, 44, 46, 0.8) 50%,
            rgba(44, 44, 46, 0) 100%);
    }
}

