/**
 * Persian Datepicker CSS
 * A simple and clean Persian (Jalali) datepicker for Laravel
 * 
 * @author PDatepicker
 * @license MIT
 */

/* Container */
.pdatepicker-container {
    position: absolute;
    z-index: 9999;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    width: 240px;
    user-select: none;
    font-family: inherit;
    font-size: 14px;
}

/* RTL */
.pdatepicker-rtl {
    direction: rtl;
}

/* Header */
.pdatepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pdatepicker-prev-btn,
.pdatepicker-next-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
}

.pdatepicker-prev-btn:hover,
.pdatepicker-next-btn:hover {
    color: #333;
}

.pdatepicker-title {
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.pdatepicker-title:hover {
    background-color: #f5f5f5;
}

/* Week Days */
.pdatepicker-week-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 5px;
}

.pdatepicker-week-day {
    padding: 5px;
    color: #999;
    font-weight: bold;
}

/* Weekend day style */
.pdatepicker-weekend-day {
    color: #e74c3c !important; /* Red color for weekend days */
    font-weight: bold;
}

/* Override for weekend days that are in other month */
.pdatepicker-day-other-month.pdatepicker-weekend-day {
    color: #f1a9a0 !important; /* Lighter red for weekend days from other months */
}

/* Ensure selected weekend days maintain readability */
.pdatepicker-day-selected.pdatepicker-weekend-day {
    color: #fff !important;
    background-color: #c0392b; /* Darker red for selected weekend days */
}

/* Hover for weekend days */
.pdatepicker-weekend-day:hover {
    background-color: #fde3e1 !important;
    color: #c0392b !important;
}

/* Weekend days in dark theme */
.pdatepicker-theme-dark .pdatepicker-weekend-day {
    color: #ff6b6b !important; /* Brighter red for weekend days in dark theme */
}

.pdatepicker-theme-dark .pdatepicker-day-other-month.pdatepicker-weekend-day {
    color: #ff9f9f !important; /* Lighter red for other month weekend days in dark theme */
}

.pdatepicker-theme-dark .pdatepicker-day-selected.pdatepicker-weekend-day {
    background-color: #c0392b; /* Darker red for selected weekend days in dark theme */
}

/* Days Grid */
.pdatepicker-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.pdatepicker-day {
    padding: 6px 4px;
    cursor: pointer;
    border-radius: 4px;
}

.pdatepicker-day:hover {
    background-color: #f0f0f0;
}

.pdatepicker-day-current {
    color: #333;
}
.pdatepicker-theme-dark .pdatepicker-day-current {
    color: #fff;
}

.pdatepicker-day-other-month {
    color: #ccc;
}

.pdatepicker-day-today {
    font-weight: bold;
}

.pdatepicker-day-selected {
    background-color: #3498db;
    color: #fff;
}

.pdatepicker-day-selected:hover {
    background-color: #2980b9;
}

/* Months Grid */
.pdatepicker-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pdatepicker-month {
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
}

.pdatepicker-month:hover {
    background-color: #f0f0f0;
}

.pdatepicker-month-selected {
    background-color: #3498db;
    color: #fff;
}

.pdatepicker-month-selected:hover {
    background-color: #2980b9;
}

/* Years Grid */
.pdatepicker-years {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pdatepicker-year {
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
}

.pdatepicker-year:hover {
    background-color: #f0f0f0;
}

.pdatepicker-year-selected {
    background-color: #3498db;
    color: #fff;
}

.pdatepicker-year-selected:hover {
    background-color: #2980b9;
}

/* Time Picker */
.pdatepicker-time {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.pdatepicker-time-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row-reverse;
}

.pdatepicker-time-hours,
.pdatepicker-time-minutes,
.pdatepicker-time-seconds {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45px;
}

.pdatepicker-time-separator {
    margin: 0 8px;
    font-size: 18px;
    font-weight: bold;
}

.pdatepicker-time-value {
    font-size: 18px;
    font-weight: bold;
    padding: 4px 0;
    min-width: 30px;
    text-align: center;
}

.pdatepicker-time-up,
.pdatepicker-time-down {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 2px 8px;
    width: 100%;
    transition: background-color 0.2s;
}

.pdatepicker-time-up:hover,
.pdatepicker-time-down:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Footer */
.pdatepicker-footer {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    text-align: center;
}

.pdatepicker-today-btn {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.pdatepicker-today-btn:hover {
    background-color: #eee;
}

/* Themes */
.pdatepicker-theme-default {
    /* Default theme is already defined above */
}

.pdatepicker-theme-dark {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

.pdatepicker-theme-dark .pdatepicker-title:hover,
.pdatepicker-theme-dark .pdatepicker-day:hover,
.pdatepicker-theme-dark .pdatepicker-month:hover,
.pdatepicker-theme-dark .pdatepicker-year:hover {
    background-color: #444;
}

.pdatepicker-theme-dark .pdatepicker-day-other-month {
    color: #777;
}

.pdatepicker-theme-dark .pdatepicker-week-day {
    color: #aaa;
}

.pdatepicker-theme-dark .pdatepicker-day-selected,
.pdatepicker-theme-dark .pdatepicker-month-selected,
.pdatepicker-theme-dark .pdatepicker-year-selected {
    background-color: #2980b9;
}

.pdatepicker-theme-dark .pdatepicker-today-btn {
    background-color: #444;
    border: 1px solid #555;
    color: #fff;
    font-family: inherit;
}

.pdatepicker-theme-dark .pdatepicker-today-btn:hover {
    background-color: #555;
}

.pdatepicker-theme-dark .pdatepicker-time {
    border-top: 1px solid #444;
}

.pdatepicker-theme-dark .pdatepicker-footer {
    border-top: 1px solid #444;
}

.pdatepicker-theme-dark .pdatepicker-time-up:hover,
.pdatepicker-theme-dark .pdatepicker-time-down:hover {
    background-color: #444;
}

.pdatepicker-theme-blue {
    background-color: #f8f9fa;
}

.pdatepicker-theme-blue .pdatepicker-header {
    background-color: #4dabf7;
    color: white;
}

.pdatepicker-theme-blue .pdatepicker-prev-btn,
.pdatepicker-theme-blue .pdatepicker-next-btn {
    color: white;
}

.pdatepicker-theme-blue .pdatepicker-day-selected {
    background-color: #339af0;
}

/* Disabled days */
.pdatepicker-day-disabled {
    opacity: 0.5;
    cursor: default !important;
    pointer-events: none;
}

.pdatepicker-day-disabled:hover {
    background-color: transparent !important;
}

/* Override for weekend days that are disabled */
.pdatepicker-day-disabled.pdatepicker-weekend-day:hover {
    background-color: transparent !important;
    color: #e74c3c !important;
}

/* Dark theme disabled days */
.pdatepicker-theme-dark .pdatepicker-day-disabled {
    opacity: 0.4;
} 