/* 
 * Lightweight Persian Datepicker CSS
 * Minimal styling for the datepicker component
 * Improved responsive design
 */

.jalali-datepicker-mini {
    width: 280px;
    max-width: 95vw; /* Prevent overflow on small screens */
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    direction: rtl;
    font-family: 'Vazir', Tahoma, Arial;
    z-index: 1050; /* Higher z-index to prevent overlapping issues */
    overflow: hidden;
    position: absolute;
}

/* Header with navigation */
.jdp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #4e73df, #224abe);
    color: white;
    padding: 12px 10px;
}

.jdp-title {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.jdp-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
}

.jdp-btn:hover {
    background-color: rgba(255,255,255,0.15);
}

/* Calendar body */
.jdp-body {
    padding: 12px;
}

/* Weekdays header */
.jdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 12px;
    color: #6c757d;
}

.jdp-weekday {
    padding: 5px;
}

/* Calendar days */
.jdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.jdp-day {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    border-radius: 50%;
    transition: all 0.2s;
    margin: 0 auto;
}

.jdp-day:not(.jdp-empty):hover {
    background-color: #f8f9fa;
}

.jdp-day.jdp-empty {
    background-color: transparent;
    cursor: default;
}

.jdp-day.jdp-today {
    background-color: #e8f0fe;
    font-weight: bold;
    color: #4e73df;
}

.jdp-day.jdp-selected {
    background-color: #4e73df;
    color: white;
}

.jdp-day.jdp-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.jdp-footer {
    display: flex;
    justify-content: center;
    padding: 8px;
    border-top: 1px solid #eee;
}

.jdp-footer .jdp-btn {
    background-color: #f0f7ff;
    color: #4e73df;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    width: auto;
}

.jdp-footer .jdp-btn:hover {
    background-color: #d4e0ff;
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
    .jalali-datepicker-mini {
        width: 280px;
        max-width: 90vw;
        left: 50% !important;
        transform: translateX(-50%);
        top: auto !important;
        bottom: 20px;
    }
    
    .jdp-day {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .jdp-header {
        padding: 10px 8px;
    }
    
    .jdp-body {
        padding: 8px;
    }
} 