/* date_pickers.css */

/* Make current date clickable */
#current-date {
    cursor: pointer;
    color: #2563eb;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

#current-date:hover {
    color: #1d4ed8;
}

/* Month picker overlay */
.month-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Changed from flex to none */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.month-picker-overlay.active {
    display: flex; /* Add this line */
    opacity: 1;
    visibility: visible;
}

/* Month picker container */
.month-picker-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 24px;
    width: 320px;
    max-width: 90vw;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.month-picker-overlay.active .month-picker-container {
    transform: scale(1);
}

/* Header with year navigation */
.month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.year-display {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    min-width: 80px;
    text-align: center;
}

.nav-button {
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.nav-button:hover {
    background: #e5e7eb;
    color: #374151;
}

.nav-button:active {
    transform: scale(0.95);
}

/* Months grid */
.months-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.month-item {
    padding: 12px 8px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid transparent;
}

.month-item:hover {
    background: #e5e7eb;
    color: #374151;
}

.month-item.selected {
    background: #2563eb;
    color: white;
    border-color: #1d4ed8;
}

.month-item.selected:hover {
    background: #1d4ed8;
}

/* Action buttons */
.month-picker-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.action-button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.action-button.cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.action-button.cancel:hover {
    background: #e5e7eb;
    color: #374151;
}

.action-button.confirm {
    background: #2563eb;
    color: white;
}

.action-button.confirm:hover {
    background: #1d4ed8;
}

.action-button:active {
    transform: scale(0.95);
}

/* Responsive design */
@media (max-width: 480px) {
    .month-picker-container {
        width: 280px;
        padding: 20px;
    }
    
    .months-grid {
        gap: 6px;
    }
    
    .month-item {
        padding: 10px 6px;
        font-size: 13px;
    }
}
