/* Persian date range calendar aligned with the public Memar House booking calendar. */

.prc,
.prc * {
    box-sizing: border-box;
}

.prc {
    --prc-primary: #1677ff;
    --prc-range: #e8f1ff;
    --prc-border: #eeeeee;
    width: 520px;
    max-width: 100%;
    overflow: hidden;
    color: #000;
    border-radius: 12px;
    background: #fff;
    direction: rtl;
    font-family: "iransans-fa", "Vazirmatn", Tahoma, Arial, sans-serif;
}

.prc button {
    font-family: inherit;
}

.prc__header {
    display: flex;
    min-height: 94px;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--prc-border);
}

.prc__title {
    margin: 0;
    color: #000;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.prc__subtitle {
    margin: 7px 0 0;
    color: #888;
    font-size: 13px;
    line-height: 1.5;
}

.prc__close {
    width: 30px;
    height: 45px;
    padding: 0;
    color: #777;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 30px;
    font-weight: 400;
    line-height: 45px;
}

.prc__selected-dates {
    display: flex;
    min-height: 87px;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: #fafafa;
}

.prc__selected-item {
    display: flex;
    min-width: 92px;
    flex-direction: column;
    gap: 7px;
    text-align: center;
}

.prc__selected-item span {
    color: #777;
    font-size: 12px;
}

.prc__selected-item strong {
    color: #111;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.prc__selected-arrow {
    color: #999;
    font-size: 20px;
}

.prc__calendar-header {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.prc__month-title {
    margin: 0;
    color: #000;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.prc__nav-button {
    width: 38px;
    height: 38px;
    padding: 0;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 25px;
    font-weight: 400;
    line-height: 36px;
    transition: background-color 150ms ease, opacity 150ms ease;
}

.prc__nav-button:hover:not(:disabled) {
    background: #f5f5f5;
}

.prc__nav-button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.prc__weekdays,
.prc__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.prc__weekdays {
    padding: 0 20px;
    text-align: center;
}

.prc__weekday {
    padding: 10px 0;
    color: #888;
    font-size: 13px;
}

.prc__days {
    padding: 0 20px 20px;
}

.prc__day,
.prc__blank {
    height: 48px;
    min-width: 0;
}

.prc__day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #000;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.prc__day-inner {
    position: relative;
    z-index: 2;
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.prc__day-number {
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
}

.prc__day:not(:disabled):hover .prc__day-inner {
    color: #000;
    background: #eee;
}

.prc__day:disabled {
    color: #bbb;
    cursor: not-allowed;
}

.prc__day--in-range {
    background: var(--prc-range);
}

.prc__day--start {
    background: linear-gradient(to right, var(--prc-range) 50%, transparent 50%);
}

.prc__day--end {
    background: linear-gradient(to left, var(--prc-range) 50%, transparent 50%);
}

.prc__day--start .prc__day-inner,
.prc__day--end .prc__day-inner,
.prc__day--start:hover .prc__day-inner,
.prc__day--end:hover .prc__day-inner {
    color: #fff;
    background: var(--prc-primary);
}

.prc__day-price {
    display: none;
}

.prc--availability .prc__day,
.prc--availability .prc__blank {
    height: 58px;
}

.prc--availability .prc__day-inner {
    width: 50px;
    height: 50px;
    flex-direction: column;
    gap: 4px;
}

.prc--availability .prc__day-number {
    font-size: 14px;
}

.prc--availability .prc__day-price {
    display: block;
    overflow: hidden;
    max-width: 47px;
    color: #6f7782;
    font-size: 7px;
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prc--availability .prc__day--start .prc__day-price,
.prc--availability .prc__day--end .prc__day-price {
    color: rgba(255, 255, 255, .9);
}

.prc--availability .prc__day-price--unavailable {
    color: #c62828;
    font-weight: 800;
}

.prc--availability .prc__day-price--discounted {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1;
}

.prc__day-price--discounted del {
    color: #9b9b9b;
    font-size: 6px;
}

.prc__day--start .prc__day-price--discounted del,
.prc__day--end .prc__day-price--discounted del {
    color: rgba(255, 255, 255, .7);
}

.prc__status {
    min-height: 0;
    margin: 0;
    padding: 0 20px;
    color: #667085;
    font-size: 11px;
    line-height: 1.9;
    text-align: center;
}

.prc__status:not(:empty) {
    min-height: 33px;
    padding-bottom: 10px;
}

.prc__status--error {
    color: #b42318;
}

.prc__footer {
    display: flex;
    min-height: 86px;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-top: 1px solid var(--prc-border);
}

.prc__footer-actions {
    display: flex;
    gap: 10px;
}

.prc__button {
    padding: 10px 20px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font: 500 14px/1.8 "iransans-fa", "Vazirmatn", Tahoma, Arial, sans-serif;
}

.prc__button--primary {
    color: #fff;
    background: var(--prc-primary);
}

.prc__button--primary:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.prc__button--secondary {
    color: #111;
    background: #f1f1f1;
}

.prc__button--cancel {
    color: #111;
    border: 1px solid #ddd;
    background: #fff;
}

.prc__close:focus-visible,
.prc__nav-button:focus-visible,
.prc__day:focus-visible,
.prc__button:focus-visible {
    outline: 3px solid rgba(22, 119, 255, .3);
    outline-offset: 2px;
}

.prc-modal[hidden] {
    display: none;
}

.prc-modal {
    position: fixed;
    z-index: 10050;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    opacity: 0;
    transition: opacity 150ms ease;
}

.prc-modal.is-open {
    opacity: 1;
}

.prc-modal__backdrop {
    position: fixed;
    z-index: 0;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, .45);
}

.prc-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
    transform: translateY(-12px);
    transition: transform 150ms ease;
}

.prc-modal.is-open .prc-modal__dialog {
    transform: translateY(0);
}

body.prc-lock {
    overflow: hidden;
}

.booking-date-trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: right;
}

.booking-date-trigger p {
    margin: 0;
    font-family: "iransans-fa", "Vazirmatn", Tahoma, Arial, sans-serif;
}

.booking-date-trigger:hover p,
.booking-date-trigger:focus-visible p {
    color: #fff !important;
}

.booking-date-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .72);
    outline-offset: 5px;
    border-radius: 5px;
}

.calendar-container .prc {
    margin: 0 auto;
    border: 1px solid #e8e8e8;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .08);
}

@media (max-width: 600px) {
    .prc-modal {
        align-items: flex-end;
        padding: 0;
    }

    .prc-modal__dialog {
        width: 100%;
        max-height: 94vh;
        border-width: 0;
        border-radius: 16px 16px 0 0;
    }

    .prc-modal .prc {
        border-radius: 16px 16px 0 0;
    }

    .prc__header,
    .prc__selected-dates,
    .prc__calendar-header,
    .prc__footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .prc__weekdays,
    .prc__days {
        padding-right: 10px;
        padding-left: 10px;
    }

    .prc__day,
    .prc__blank {
        height: 46px;
    }

    .prc__selected-dates {
        gap: 10px;
    }

    .prc__selected-item {
        min-width: 84px;
    }

    .prc__button {
        padding-right: 15px;
        padding-left: 15px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prc-modal,
    .prc-modal__dialog,
    .prc__nav-button {
        transition: none;
    }
}
