@font-face {
    font-family: VazirmatnVF;
    src: url("font/VazirMatn/VazirmatnVF.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* JetEngine/JetFormBuilder Jalali Calendar Popup Container Styles */
.persian-calendar-popup,
.persian-calendar-popup *,
.vuejs-datepicker-wrapper-custom,
.vuejs-datepicker-wrapper-custom * {
    box-sizing: border-box !important;
}

.persian-calendar-popup {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    width: 290px !important;
    /* Perfect width for 280px container */
    box-sizing: border-box !important;
    font-family: 'VazirmatnVF', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.persian-calendar-popup * {
    font-family: 'VazirmatnVF', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Ensure the calendar wrapper inside has no extra padding or border */
.persian-calendar-popup .persian-calendar-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Month and Year Header Layout */
.persian-calendar-popup .persian-calendar-month-year {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
}

/* Base style for inputs and select in month-year header */
.persian-calendar-popup .persian-calendar-day-display,
.persian-calendar-popup select.persian-calendar-month,
.persian-calendar-popup .persian-calendar-year-display {
    height: 32px !important;
    line-height: 30px !important;
    /* height minus border */
    padding: 0 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 2px !important;
    font-size: 13px !important;
    background-color: #fff !important;
    color: #1e1e1e !important;
    box-shadow: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Exact widths for inputs */
.persian-calendar-popup .persian-calendar-day-display {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
}

.persian-calendar-popup .persian-calendar-year-display {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
}

/* Time Picker Layout and Inputs (styled like month-year header) */
.persian-calendar-popup .persian-calendar-time {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin-bottom: 12px !important;
}

.persian-calendar-popup .persian-calendar-time-inputs {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    border: none !important;
    background: transparent !important;
    direction: ltr !important;
    padding: 0 !important;
}

.persian-calendar-popup .persian-calendar-hour,
.persian-calendar-popup .persian-calendar-minute {
    height: 32px !important;
    line-height: 30px !important;
    padding: 0 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 2px !important;
    font-size: 13px !important;
    background-color: #fff !important;
    color: #1e1e1e !important;
    box-shadow: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
    vertical-align: middle !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    display: inline-block !important;
    -webkit-appearance: textfield !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.persian-calendar-popup .persian-calendar-day-display:focus,
.persian-calendar-popup select.persian-calendar-month:focus,
.persian-calendar-popup .persian-calendar-year-display:focus,
.persian-calendar-popup .persian-calendar-hour:focus,
.persian-calendar-popup .persian-calendar-minute:focus {
    outline: none !important;
    border-color: #3858e9 !important;
    box-shadow: 0 0 0 2px rgba(56, 88, 233, 0.1) !important;
}

.persian-calendar-popup .persian-calendar-time-inputs span {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #1e1e1e !important;
    display: inline-block !important;
    line-height: 32px !important;
    vertical-align: middle !important;
    margin: 0 2px !important;
}

/* Beautiful custom select for Month dropdown in RTL */
.persian-calendar-popup select.persian-calendar-month {
    flex: 1 !important;
    width: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 8px center !important;
    background-size: 14px !important;
    padding-left: 24px !important;
    padding-right: 8px !important;
    text-align: right !important;
    cursor: pointer !important;
}

/* Day display centering correction */
.persian-calendar-popup .persian-calendar-day {
    padding: 0 !important;
    height: 28px !important;
    width: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

/* Button style reset for theme compatibility */
.persian-calendar-popup .persian-calendar-prev,
.persian-calendar-popup .persian-calendar-next,
.persian-calendar-popup .persian-calendar-close-btn,
.persian-calendar-popup .persian-calendar-now-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    text-shadow: none !important;
}

.persian-calendar-popup .persian-calendar-prev,
.persian-calendar-popup .persian-calendar-next {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    color: #3858e9 !important;
    border-radius: 2px !important;
    transition: background-color 0.1s ease !important;
}

.persian-calendar-popup .persian-calendar-prev:hover,
.persian-calendar-popup .persian-calendar-next:hover {
    background-color: #f7f9fe !important;
    color: #183ad6 !important;
}

.persian-calendar-popup .persian-calendar-prev:focus,
.persian-calendar-popup .persian-calendar-prev:active,
.persian-calendar-popup .persian-calendar-next:focus,
.persian-calendar-popup .persian-calendar-next:active {
    background-color: #eff2fe !important;
    color: #183ad6 !important;
    outline: none !important;
}

.persian-calendar-popup .persian-calendar-close-btn {
    display: none !important;
}

.persian-calendar-popup .persian-calendar-now-btn {
    color: #3858e9 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 2px !important;
    transition: background-color 0.1s ease, color 0.1s ease !important;
}

.persian-calendar-popup .persian-calendar-now-btn:hover {
    background-color: #f7f9fe !important;
    color: #183ad6 !important;
}

.persian-calendar-popup .persian-calendar-now-btn:focus,
.persian-calendar-popup .persian-calendar-now-btn:active {
    background-color: #eff2fe !important;
    color: #183ad6 !important;
    outline: none !important;
}