/* KhaleejPay theme overrides for JalaliDatePicker */

/* Input wrapper */
.kp-date-field {
    position: relative;
}

.kp-date-field input[data-jdp] {
    padding-left: 2.75rem;
    cursor: pointer;
    background-color: #fff;
}

.kp-date-field .kp-date-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    width: 1.25rem;
    height: 1.25rem;
    transition: color 0.2s;
}

.kp-date-field input[data-jdp]:focus + .kp-date-icon,
.kp-date-field input[data-jdp]:not(:placeholder-shown) + .kp-date-icon {
    color: #0097aa;
}

/* Calendar panel */
jdp-container {
    --jdp-primary: #0097aa;
    --jdp-primary-dark: #006b79;
    font-family: "IRANYekanX VF", IRANYekanX, Tahoma, sans-serif !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow:
        0 4px 6px -1px rgba(20, 21, 27, 0.06),
        0 10px 24px -4px rgba(20, 21, 27, 0.1) !important;
    padding: 12px 8px !important;
    max-width: 320px !important;
    min-width: 300px !important;
}

/* Month / year selects */
jdp-container .jdp-years,
jdp-container .jdp-months {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #14151b !important;
    margin: 0 auto !important;
    gap: 4px;
    width: 48%;
}

jdp-container .jdp-years {
    margin-left: 10px !important;
}

jdp-container .jdp-year select,
jdp-container .jdp-month select {
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 6px 8px !important;
    font-weight: 600 !important;
    color: #14151b !important;
    background: #f9fafb !important;
    cursor: pointer !important;
    transition: border-color 0.15s, background 0.15s !important;
}

jdp-container .jdp-year select:hover,
jdp-container .jdp-month select:hover {
    border-color: #0097aa !important;
    background: #fff !important;
}

jdp-container .jdp-year select:focus,
jdp-container .jdp-month select:focus {
    border-color: #0097aa !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 151, 170, 0.15) !important;
}

/* Nav arrows */
jdp-container .jdp-icon-plus,
jdp-container .jdp-icon-minus {
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    background: #fff !important;
    transition: background 0.15s, border-color 0.15s !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

jdp-container .jdp-icon-plus:hover,
jdp-container .jdp-icon-minus:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
}

jdp-container .jdp-icon-plus svg,
jdp-container .jdp-icon-minus svg {
    fill: #6b7280 !important;
}

/* Weekday headers */
jdp-container .jdp-day-name {
    background: transparent !important;
    color: #9ca3af !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    border: none !important;
}

/* Days */
jdp-container .jdp-day {
    border-radius: 6px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    height: 34px !important;
    line-height: 34px !important;
    transition: background 0.12s, color 0.12s !important;
}

jdp-container .jdp-day:not(.disabled-day):hover {
    background: #f3f4f6 !important;
    transform: none !important;
    color: #14151b !important;
}

jdp-container .jdp-day.today:not(.selected) {
    border-color: #0097aa !important;
    color: #0097aa !important;
    font-weight: 700 !important;
}

jdp-container .jdp-day.selected {
    background-color: #0097aa !important;
    color: #fff !important;
    border-color: #0097aa !important;
}

jdp-container .jdp-day.last-week,
jdp-container .jdp-day.holly-day {
    color: #ef5d5e !important;
}

jdp-container .jdp-day.selected.last-week,
jdp-container .jdp-day.selected.holly-day {
    color: #fff !important;
}

/* Footer buttons */
jdp-container .jdp-btn-today {
    background: transparent !important;
    color: #0097aa !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    transition: background 0.15s !important;
}

jdp-container .jdp-btn-today:hover {
    background: rgba(0, 151, 170, 0.08) !important;
}

jdp-container .jdp-btn-empty {
    background: transparent !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    transition: background 0.15s !important;
}

jdp-container .jdp-btn-empty:hover {
    background: #f3f4f6 !important;
    color: #14151b !important;
}

jdp-container .jdp-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 10px !important;
    margin-top: 4px;
}

/* Mobile overlay */
@media only screen and (max-width: 481px) {
    jdp-container {
        border-radius: 12px 12px 0 0 !important;
    }
}
