﻿
/* =========================================================
   Arovano Jalali DatePicker
   Bootstrap 5 compatible
   RTL / Persian
   ========================================================= */
.jdp {
    position: absolute;
    z-index: 99999;
    width: 330px;
    direction: rtl;
    font-family: "Vazirmatn", "Tahoma", sans-serif;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, .14);
    padding: 12px;
    display: none;
    color: #263238;
    user-select: none;
}

.jdp.jdp-show {
    display: block;
}

/* Header */

.jdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 2px 2px 8px;
}

.jdp-nav-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    border-radius: 50%; /* گردتر */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #495057;
    transition: all .2s ease;
    font-size: 14px;
}

    .jdp-nav-btn:hover {
        background: #e8f5f2;
        color: #265a48;
        transform: scale(1.05);
    }

    .jdp-nav-btn:active {
        transform: scale(.92);
    }

.jdp-current-month {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 8px;
    transition: all .2s ease;
    background: transparent;
    border: none;
    font-family: inherit;
}


    .jdp-current-month:hover {
        background: #f0f7f5;
        color: #265a48;
    }

    .jdp-current-month:active {
        transform: scale(.96);
    }

/* Weekdays */

.jdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 4px;
}

.jdp-weekday {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #8a939a;
    font-weight: 600;
}

/* Days */

.jdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.jdp-day {
    height: 39px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: #263238;
    transition: all .15s ease;
    font-weight: 400;
}

    .jdp-day:hover:not(.jdp-disabled) {
        background: #e8f5f2;
        color: #265a48;
        transform: scale(1.02);
    }
    .jdp-day.jdp-other-month {
        color: #c4c9cd;
    }

    .jdp-day.jdp-today {
        box-shadow: inset 0 0 0 1.5px #265a48;
        color: #265a48;
        font-weight: 700;
        background: transparent;
    }

    .jdp-day.jdp-selected {
        background: linear-gradient(135deg, #265a48, #1a4a3a);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(38, 90, 72, 0.2);
    }

        .jdp-day.jdp-selected:hover {
            background: linear-gradient(135deg, #1a4a3a, #0f3026);
            transform: scale(1.02);
        }

    .jdp-day.jdp-disabled {
        color: #d5d9dc;
        cursor: not-allowed;
        background: transparent;
    }

/* Footer */

.jdp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0f1f2;
    margin-top: 10px;
    padding-top: 10px;
}

.jdp-today-btn,
.jdp-clear-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 8px;
    transition: all .2s ease;
    font-weight: 500;
}


.jdp-today-btn {
    color: #265a48;
    font-weight: 600;
}

    .jdp-today-btn:hover {
        background: #e8f5f2;
        color: #1a4a3a;
    }

.jdp-clear-btn {
    color: #888;
}

    .jdp-clear-btn:hover {
        background: #f5f5f5;
        color: #555;
    }

/* Month / Year selector */

.jdp-selector {
    display: none;
    position: absolute;
    inset: 54px 10px 50px 10px;
    background: #fff;
    z-index: 5;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

    .jdp-selector.jdp-selector-show {
        display: block;
    }


.jdp-selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 4px;
}
    .jdp-selector-header .jdp-nav-btn {
        width: 32px;
        height: 32px;
    }
.jdp-selector-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}
.jdp-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 210px;
    overflow-y: auto;
    padding: 2px;
}
    .jdp-selector-grid::-webkit-scrollbar {
        width: 4px;
    }
    .jdp-selector-grid::-webkit-scrollbar-track {
        background: #f5f5f5;
        border-radius: 10px;
    }

    .jdp-selector-grid::-webkit-scrollbar-thumb {
        background: #c4c9cd;
        border-radius: 10px;
    }

.jdp-selector-item {
    border: 0;
    background: #f7f8f8;
    border-radius: 8px;
    padding: 8px 5px;
    font-family: inherit;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s ease;
    color: #263238;
}


    .jdp-selector-item:hover {
        background: #e8f5f2;
        color: #265a48;
        transform: translateY(-1px);
    }

    .jdp-selector-item.jdp-active {
        background: #265a48;
        color: #fff;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(38, 90, 72, 0.25);
    }

        .jdp-selector-item.jdp-active:hover {
            background: #1a4a3a;
        }

/* =========================================================
   دکمه بستن تقویم (اختیاری)
   ========================================================= */
.jdp-close-btn {
    display: none;
}


/* Input */

.jdp-input-wrapper {
    position: relative;
}

    .jdp-input-wrapper input {
        cursor: pointer;
    }

        .jdp-input-wrapper input.jdp-input-active {
            border-color: #265a48;
            box-shadow: 0 0 0 .2rem rgba(38, 90, 72, .12);
        }

/* Mobile */

@media (max-width: 575.98px) {

    .jdp {
        position: fixed;
        width: calc(100vw - 24px);
        max-width: 360px;
        left: 50% !important;
        right: auto !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        border-radius: 18px;
        padding: 14px;
        box-shadow: 0 20px 70px rgba(0, 0, 0, .22);
    }

    .jdp-day {
        height: 43px;
    }

    .jdp-weekday {
        height: 32px;
    }

    .jdp-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        z-index: 99998;
        display: none;
    }

        .jdp-overlay.jdp-overlay-show {
            display: block;
        }
}

/* Animation */

@keyframes jdpFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 576px) {
    .jdp.jdp-show {
        animation: jdpFadeIn .12s ease-out;
    }
}

