
/* Persian Localization Suite - Vazirmatn + Jalali calendar */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

html, body, button, input, textarea, select, optgroup, option,
table, th, td, label, a, p, small, strong, em,
.navbar, .sidebar, .dropdown-menu, .modal, .modal-content, .alert, .toast, .popover,
.panel, .panel-heading, .panel-body, .card, .card-body, .form-control, .control-label {
    font-family: 'Vazirmatn', sans-serif !important;
}

body { font-feature-settings: "kern" 1, "liga" 1; }

/* Keep technical values direction-safe. */
input[type="email"], input[type="url"], input[type="tel"],
.code, pre, code, .text-monospace { direction: ltr; unicode-bidi: plaintext; }

.persian-calendar {
    position: absolute;
    z-index: 999999;
    width: 320px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(0,0,0,.16);
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    color: #263238;
}
.persian-calendar[hidden] { display:none; }
.persian-calendar .pc-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.persian-calendar .pc-title { flex:1; text-align:center; font-weight:700; font-size:14px; }
.persian-calendar .pc-nav { display:flex; gap:4px; }
.persian-calendar .pc-btn,
.persian-calendar .pc-today {
    border:1px solid rgba(0,0,0,.10); background:#fff; border-radius:8px; cursor:pointer;
    font-family:inherit; line-height:1; height:32px; min-width:32px;
}
.persian-calendar .pc-btn:hover, .persian-calendar .pc-today:hover { background:#f4f6f8; }
.persian-calendar .pc-week { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; margin-bottom:4px; }
.persian-calendar .pc-week div { font-size:11px; text-align:center; color:#69757d; padding:5px 0; }
.persian-calendar .pc-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.persian-calendar .pc-day {
    height:34px; border:0; border-radius:8px; background:transparent; cursor:pointer; font-family:inherit; font-size:12px;
}
.persian-calendar .pc-day:hover { background:#eef3f6; }
.persian-calendar .pc-day.muted { color:#b0b7bc; }
.persian-calendar .pc-day.today { box-shadow: inset 0 0 0 1px rgba(33,150,243,.45); }
.persian-calendar .pc-day.selected { background:#1976d2; color:#fff; }
.persian-calendar .pc-day.weekend { color:#d35454; }
.persian-calendar .pc-day.disabled { opacity:.45; cursor:not-allowed; pointer-events:none; }
.persian-calendar .pc-footer { display:flex; justify-content:space-between; align-items:center; margin-top:10px; gap:8px; }
.persian-calendar .pc-today { padding:0 12px; height:34px; min-width:0; }
.persian-calendar .pc-error { color:#c62828; font-size:11px; min-height:16px; }
.persian-calendar-input-invalid { border-color:#c62828 !important; }
@media (max-width:420px) { .persian-calendar { width:calc(100vw - 24px); } }

html, body { direction: rtl; }


/* Persian mode owns date fields; native Gregorian popup must never render over it. */
html.persian-localization-active.persian-calendar-ready body.persian-localization-active .xdsoft_datetimepicker,
html.persian-localization-active.persian-calendar-ready body.persian-localization-active .ui-datepicker {
    display: none !important;
}
