/* Zagros Date Picker - Modern Persian/Jalali Date Picker */
/* All classes prefixed with zdtpicker */

.zdtpicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 19515;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.zdtpicker-overlay.zdtpicker-active {
    opacity: 1;
    visibility: visible;
}

.zdtpicker-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25),
                0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 19520;
    width: 360px;
    max-width: 95vw;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
}

.zdtpicker-dialog.zdtpicker-active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.zdtpicker-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.zdtpicker-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: zdtpicker-shimmer 3s infinite;
}

@keyframes zdtpicker-shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.zdtpicker-selected-date {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.zdtpicker-selected-weekday {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
}

.zdtpicker-body {
    padding: 20px;
}

.zdtpicker-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.zdtpicker-nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(145deg, #f0f0f0, #e6e6e6);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 3px 3px 6px #d1d1d1, -3px -3px 6px #ffffff;
}

.zdtpicker-nav-btn:hover {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    transform: scale(1.1);
}

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

.zdtpicker-icon {
    width: 19px;
    height: 19px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.zdtpicker-nav-btn .zdtpicker-icon {
    width: 18px;
    height: 18px;
}

.zdtpicker-month-year {
    display: flex;
    gap: 10px;
    align-items: center;
}

.zdtpicker-select-wrapper {
    position: relative;
}

.zdtpicker-select {
    appearance: none;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: none;
    padding: 10px 35px 10px 15px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.05);
    font-family: inherit;
}

.zdtpicker-select:hover {
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
}

.zdtpicker-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.zdtpicker-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: translateY(-68%) rotate(45deg);
    transform-origin: center;
    pointer-events: none;
}

.zdtpicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.zdtpicker-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    padding: 8px 0;
    text-transform: uppercase;
}

.zdtpicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.zdtpicker-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    position: relative;
    font-family: inherit;
}

.zdtpicker-day:hover:not(.zdtpicker-day-empty):not(.zdtpicker-day-selected) {
    background: linear-gradient(145deg, #f0f0f0, #e6e6e6);
    transform: scale(1.1);
}

.zdtpicker-day-empty {
    cursor: default;
}

.zdtpicker-day-today {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    font-weight: 700;
}

.zdtpicker-day-today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
}

.zdtpicker-day-selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.1);
}

.zdtpicker-day-selected::after {
    display: none;
}

.zdtpicker-day-holiday {
    color: #e74c3c;
}

.zdtpicker-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.zdtpicker-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.zdtpicker-btn .zdtpicker-icon {
    width: 18px;
    height: 18px;
}

.zdtpicker-btn-today {
    background: linear-gradient(145deg, #f0f0f0, #e6e6e6);
    color: #555;
}

.zdtpicker-btn-today:hover {
    background: linear-gradient(145deg, #e6e6e6, #d9d9d9);
}

.zdtpicker-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.zdtpicker-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.zdtpicker-btn-confirm:active {
    transform: translateY(0);
}

/* Input Field Styling - Minimal (does not override user's input styles) */
/* Only adds cursor pointer to indicate clickable */
.zdtpicker-input-wrapper {
    position: relative;
    display: inline-block;
}

.zdtpicker-input {
    cursor: pointer;
}

.zdtpicker-input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    pointer-events: none;
    font-size: 16px;
}

/* Quick Select Buttons */
.zdtpicker-quick-select {
    display: flex;
    gap: 8px;
    padding: 0 20px 15px;
    flex-wrap: wrap;
}

.zdtpicker-quick-btn {
    padding: 6px 12px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.zdtpicker-quick-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Close Button */
.zdtpicker-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.zdtpicker-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.zdtpicker-close .zdtpicker-icon {
    width: 17px;
    height: 17px;
}

/* Animations */
@keyframes zdtpicker-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.zdtpicker-day {
    animation: zdtpicker-fadeIn 0.3s ease forwards;
}

.zdtpicker-day:nth-child(1) { animation-delay: 0.01s; }
.zdtpicker-day:nth-child(2) { animation-delay: 0.02s; }
.zdtpicker-day:nth-child(3) { animation-delay: 0.03s; }
.zdtpicker-day:nth-child(4) { animation-delay: 0.04s; }
.zdtpicker-day:nth-child(5) { animation-delay: 0.05s; }
.zdtpicker-day:nth-child(6) { animation-delay: 0.06s; }
.zdtpicker-day:nth-child(7) { animation-delay: 0.07s; }

/* RTL Support */
[dir="rtl"] .zdtpicker-dialog,
.zdtpicker-dialog {
    direction: rtl;
}

/* Responsive */
@media (max-width: 400px) {
    .zdtpicker-dialog {
        width: 95vw;
        border-radius: 20px;
    }
    
    .zdtpicker-header {
        padding: 20px;
    }
    
    .zdtpicker-selected-date {
        font-size: 24px;
    }
    
    .zdtpicker-body {
        padding: 15px;
    }
    
    .zdtpicker-select {
        padding: 8px 30px 8px 12px;
        font-size: 13px;
    }
}
