/**
 * Persian DateTime Picker Styles
 * فقط استایل‌های منحصر به فرد - بدون تکرار Bootstrap
 */

/* Container */
.persian-datetime-picker {
    position: relative;
    /*width: 100%;*/
}

/* Input Cursor */
.persian-datetime-picker .form-control {
    cursor: pointer;
}

/* Calendar Dropdown Positioning */
.calendar-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 1050;
    min-width: 340px;
    max-width: 400px;
    animation: fadeIn 0.2s ease-in-out;
}

/* Calendar Toggle Size */
.calendar-toggle {
    width: 40px;
    height: 40px;
    padding: 0 !important;
    font-size: 1.2rem;
}

.calendar-toggle:hover {
    transform: scale(1.1);
}

.calendar-toggle:active {
    transform: scale(0.95);
}

/* Month/Year Flex */
.month-selector { flex: 2; }
.year-selector { flex: 1; }

/* Calendar Grid Layout */
.calendar-grid table {
    width: 100%;
    table-layout: fixed;
}

.calendar-grid th,
.calendar-grid td {
    width: calc(100% / 7);
    text-align: center !important;
}

/* Calendar Day Size & Behavior */
.calendar-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    cursor: pointer;
    user-select: none;
}

.calendar-day:not(.disabled):not(.other-month):hover {
    transform: scale(1.08);
}

.calendar-day:active {
    transform: scale(0.95);
}

.calendar-day.selected:hover,
.calendar-day.temp-selected:hover {
    transform: scale(1.05);
}

/* Pulse Animation */
.calendar-day.temp-selected {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0.125rem 0.25rem rgba(255, 193, 7, 0.4); }
    50% { box-shadow: 0 0.25rem 0.5rem rgba(255, 193, 7, 0.8); }
}

/* Today Selected Override */
.calendar-day.today.selected {
    border-color: var(--bs-white) !important;
}

/* Disabled Hover Override */
.calendar-day.other-month:hover,
.calendar-day.disabled:hover {
    background-color: transparent !important;
    transform: none !important;
}

.calendar-day.disabled {
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Time Selector Width */
.time-selector select {
    width: 75px;
    direction: ltr;
}

/* Today Button Width */
.today-btn {
    min-width: 120px;
}

/* Focus Outline */
.calendar-day:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 576px) {
    .calendar-dropdown {
        right: 0;
        left: 0;
        min-width: 100%;
        max-width: 100%;
    }
    
    .calendar-day {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .time-selector select {
        width: 60px;
    }
}

@media (max-width: 400px) {
    .calendar-day {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* RTL Support */
[dir="rtl"] .calendar-dropdown { right: 0; left: auto; }
[dir="ltr"] .calendar-dropdown { left: 0; right: auto; }

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
