/* استایل تقویم شمسی سره‌بین */

.datepicker-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.persian-datepicker-input {
    padding-left: 35px !important;
    cursor: pointer;
}

.datepicker-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #666;
    user-select: none;
}

/* تقویم اصلی */
.persian-calendar {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    font-family: 'IRANSans', Tahoma, Arial, sans-serif;
    direction: rtl;
    min-width: 280px;
    user-select: none;
    overflow: hidden;
}

/* هدر تقویم */
.calendar-header {
    background: linear-gradient(135deg, #2c5f8d, #1e4a6f);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.current-month {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 2px;
}

.current-year {
    font-size: 14px;
    opacity: 0.9;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* نام روزهای هفته */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.weekday {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    color: #666;
    font-size: 14px;
}

/* روزها */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: white;
}

.calendar-day {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
    background: rgba(44, 95, 141, 0.1);
    color: #2c5f8d;
}

.calendar-day.today {
    background: #2c5f8d;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    margin: 2px;
}

.calendar-day.selected {
    background: #ff6b6b;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    margin: 2px;
}

.calendar-day.today.selected {
    background: #28a745;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f8f9fa;
}

.calendar-day.other-month {
    color: transparent;
    cursor: default;
}

.calendar-day.other-month:hover {
    background: transparent;
}

/* فوتر تقویم */
.calendar-footer {
    padding: 12px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-today,
.btn-clear {
    padding: 6px 12px;
    border: 1px solid #e1e5e9;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    flex: 1;
}

.btn-today {
    color: #2c5f8d;
    border-color: #2c5f8d;
}

.btn-today:hover {
    background: #2c5f8d;
    color: white;
}

.btn-clear {
    color: #666;
}

.btn-clear:hover {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.persian-calendar {
    animation: fadeIn 0.3s ease;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .persian-calendar {
        min-width: 260px;
    }
    
    .calendar-header {
        padding: 12px;
    }
    
    .current-month {
        font-size: 14px;
    }
    
    .current-year {
        font-size: 12px;
    }
    
    .nav-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .calendar-day {
        height: 35px;
        font-size: 13px;
    }
    
    .weekday {
        padding: 8px;
        font-size: 12px;
    }
}

/* سایه و افکت‌های بهتر */
.persian-calendar {
    backdrop-filter: blur(10px);
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    background: transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s;
    z-index: -1;
}

.calendar-day:hover::before:not(.disabled):not(.other-month) {
    background: rgba(44, 95, 141, 0.1);
}

.calendar-day.today::before,
.calendar-day.selected::before {
    background: currentColor;
}

/* تم تیره (اختیاری) */
@media (prefers-color-scheme: dark) {
    .persian-calendar {
        background: #2d3748;
        border-color: #4a5568;
        color: white;
    }
    
    .calendar-weekdays {
        background: #4a5568;
    }
    
    .weekday {
        color: #e2e8f0;
    }
    
    .calendar-days {
        background: #2d3748;
    }
    
    .calendar-day {
        color: #e2e8f0;
    }
    
    .calendar-day.disabled {
        color: #718096;
        background: #4a5568;
    }
    
    .calendar-footer {
        background: #4a5568;
        border-color: #718096;
    }
    
    .btn-today,
    .btn-clear {
        background: #2d3748;
        border-color: #718096;
        color: #e2e8f0;
    }
}