﻿.persian-date,
.persian-date-input {
    direction: rtl !important;
    text-align: right !important;
    cursor: pointer !important;
}

.ttt-persian-picker {
    position: absolute;
    z-index: 2147483647;
    width: 360px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #d8e1ec;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    padding: 12px;
    direction: rtl;
    font-family: inherit;
    color: #0b3655;
    display: none;
}

.ttt-picker-head,
.ttt-picker-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.ttt-picker-head {
    min-height: 36px;
    flex-wrap: nowrap;
}

.ttt-picker-head strong {
    font-weight: 700;
    font-size: 14px;
}

.ttt-picker-head button,
.ttt-picker-foot button {
    border: 0;
    border-radius: 8px;
    background: #eef4fa;
    padding: 7px 10px;
    color: #0b3655;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.ttt-picker-head > button {
    flex: 0 0 auto;
    min-width: 46px;
}

.ttt-picker-week,
.ttt-picker-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

.ttt-picker-week span {
    font-weight: 700;
    font-size: 12px;
}

.ttt-picker-days button {
    border: 0;
    border-radius: 7px;
    background: #f5f8fb;
    min-height: 32px;
    min-width: 0;
    color: #0b3655;
    font-family: inherit;
    cursor: pointer;
}

.ttt-picker-days button:hover {
    background: #dceaf7;
}

.ttt-picker-days button.today {
    background: #0b3655;
    color: #ffffff;
}

.ttt-persian-picker button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.ttt-picker-days .empty {
    min-height: 32px;
}

.ttt-picker-foot {
    margin-top: 10px;
}

.ttt-picker-navigator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.ttt-picker-year-select,
.ttt-picker-month-select {
    height: 32px;
    border: 1px solid #d8e1ec;
    background: #ffffff;
    color: #0b3655;
    border-radius: 8px;
    padding: 3px 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
}

.ttt-picker-year-select {
    width: 82px;
    direction: ltr;
    text-align: center;
}

.ttt-picker-month-select {
    width: 96px;
    direction: rtl;
    text-align: center;
}

.ttt-picker-year-select:focus,
.ttt-picker-month-select:focus {
    border-color: #d4a017;
    box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.14);
}

@media (max-width: 420px) {
    .ttt-persian-picker {
        width: calc(100vw - 24px);
        padding: 10px;
    }

    .ttt-picker-head {
        gap: 5px;
    }

    .ttt-picker-head > button {
        min-width: 42px;
        padding: 7px 7px;
        font-size: 11px;
    }

    .ttt-picker-navigator {
        gap: 4px;
    }

    .ttt-picker-year-select {
        width: 72px;
    }

    .ttt-picker-month-select {
        width: 82px;
    }
}

/* Stable numeric Jalali rendering across Chrome/Edge/Firefox */
.persian-date-input,.persian-date,.ttt-cheque-date-input{direction:ltr!important;text-align:right!important;unicode-bidi:isolate!important;padding-right:.75rem!important;}

/* Unified date inputs: picker-only, visually editable, RTL/right aligned in every browser. */
.persian-date[readonly],.persian-date-input[readonly],.ttt-cheque-date-input[readonly]{background:#fff!important;color:inherit!important;opacity:1!important;text-align:right!important;direction:ltr!important;cursor:pointer!important;}


/* Keep transient calendar headings in their own seven-column row. */
#tttPersianPicker > .ttt-picker-week > .ttt-picker-weekday {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    grid-column: auto !important;
    grid-row: auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 700;
    font-size: 12px;
    line-height: normal;
    text-align: center !important;
    text-indent: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}
