/* Holiday popup */

#holiday-popup {
    position: fixed !important;
    z-index: 2147483647 !important;
    inset: 0 !important;
    display: none;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0 !important;
    padding: 0;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    isolation: isolate;
    transform: none !important;
    box-sizing: border-box;
}

body.holiday-popup-is-open {
    overflow: hidden !important;
}

.holiday-popup-overlay {
    position: fixed !important;
    z-index: 0;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(12, 24, 27, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.holiday-popup-window {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: flex;
    width: min(840px, calc(100% - 40px));
    height: min(570px, calc(100vh - 40px));
    min-height: 500px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    box-shadow: 0 30px 75px rgba(0, 0, 0, 0.42);
    transform: translate(-50%, -50%);
    animation: holiday-popup-in 0.35s ease both;
}

@keyframes holiday-popup-in {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Left image */

.holiday-popup-left,
.holiday-popup-image {
    position: relative;
    flex: 0 0 42.5%;
    width: 42.5%;
    min-width: 0;
    overflow: hidden;
    background: #e7eee8;
}

.holiday-popup-left img,
.holiday-popup-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.holiday-popup-left::after,
.holiday-popup-image::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, rgba(4, 35, 25, 0.08), transparent 45%, rgba(3, 28, 20, 0.08));
}

.holiday-image-overlay {
    position: absolute;
    z-index: 1;
    top: 25%;
    left: 50%;
    width: 86%;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    transform: translateX(-50%);
}

.holiday-script-title {
    display: block;
    color: #275f2c;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: clamp(38px, 4vw, 56px);
    font-weight: 400;
    line-height: 0.85;
    transform: rotate(-4deg);
}

.holiday-main-title {
    display: block;
    color: #fff;
    font-size: clamp(40px, 4.2vw, 58px);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.holiday-small-title {
    display: block;
    margin-top: 10px;
    color: #275f2c;
    font-size: clamp(10px, 0.95vw, 14px);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.holiday-sun-decoration {
    display: block;
    width: 145px;
    height: 20px;
    margin: 10px auto 0;
    border-top: 2px solid rgba(39, 95, 44, 0.75);
}

/* Right content */

.holiday-popup-right,
.holiday-popup-content {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex: 1 1 57.5%;
    flex-direction: column;
    justify-content: center;
    width: 57.5%;
    min-width: 0;
    padding: 28px 34px;
    color: #151923;
    background: #fff;
}

.holiday-popup-right::after,
.holiday-popup-content::after {
    position: absolute;
    right: -22px;
    bottom: -32px;
    width: 230px;
    height: 230px;
    content: "";
    pointer-events: none;
    opacity: 0.14;
    background:
        radial-gradient(ellipse at 50% 100%, transparent 47%, #7c9d65 48% 51%, transparent 52%)
        0 0 / 72px 112px;
    transform: rotate(-30deg);
}

.holiday-popup-right h2,
.holiday-popup-content h2 {
    position: relative;
    margin: 0 0 34px;
    color: #064729;
    font-size: clamp(30px, 2.8vw, 36px);
    font-weight: 800;
    line-height: 1.08;
    text-align: center;
}

.holiday-popup-right h2::after,
.holiday-popup-content h2::after {
    position: absolute;
    bottom: -18px;
    left: 50%;
    width: min(305px, 60%);
    height: 2px;
    content: "";
    background: #d8af61;
    transform: translateX(-50%);
}

.holiday-popup-right p,
.holiday-popup-content p {
    margin: 0 0 11px;
    color: #171a22;
    font-size: clamp(14px, 1.15vw, 17px);
    line-height: 1.5;
}

.holiday-popup-right p strong,
.holiday-popup-content p strong {
    font-weight: 800;
}

.holiday-closure-message {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin: 0 0 10px;
    padding: 5px 0;
}

.holiday-closure-message p {
    margin: 0;
    font-size: clamp(13px, 1.05vw, 15px);
    line-height: 1.45;
}

.holiday-closure-icon {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #111;
    background: #f8efdd;
    border-radius: 50%;
}

.holiday-closure-icon svg {
    width: 64%;
    height: 64%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Date cards */

.holiday-dates,
.popup-dates {
    display: flex;
    gap: 14px;
    margin: 3px 0 12px;
}

.holiday-date,
.popup-date {
    box-sizing: border-box;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 12px;
    border: 1px solid;
    border-radius: 15px;
    text-align: center;
}

.holiday-date-close,
.popup-date.closed {
    color: #c61919;
    border-color: #f0b8b3;
    background: linear-gradient(135deg, #fff8f7, #fae9e7);
}

.holiday-date-open,
.popup-date.open {
    color: #287d37;
    border-color: #dcebdc;
    background: linear-gradient(135deg, #f6fbf6, #e5f0e5);
}

.holiday-date strong,
.popup-date strong {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(16px, 1.35vw, 19px);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.holiday-icon,
.holiday-date-icon,
.popup-date-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 7px;
    font-size: 24px;
    border-radius: 50%;
}

.holiday-icon svg,
.holiday-info-icon svg {
    width: 65%;
    height: 65%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.holiday-date-close .holiday-icon,
.holiday-date-close .holiday-date-icon,
.popup-date.closed .popup-date-icon {
    background: rgba(231, 57, 57, 0.13);
}

.holiday-date-open .holiday-icon,
.holiday-date-open .holiday-date-icon,
.popup-date.open .popup-date-icon {
    background: rgba(52, 139, 69, 0.13);
}

.holiday-date span,
.popup-date span {
    display: block;
    color: #151923;
    font-size: clamp(14px, 1.15vw, 17px);
    font-weight: 400;
    line-height: 1.35;
}

/* Order information rows */

.holiday-info,
.popup-info {
    margin: 0 0 12px;
}

.holiday-info-row,
.holiday-info-item,
.popup-info-row,
.popup-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 5px 0;
    border-bottom: 1px dashed #d8d8d8;
}

.holiday-info-row:last-child,
.holiday-info-item:last-child,
.popup-info-row:last-child,
.popup-info-item:last-child {
    border-bottom: 0;
}

.holiday-info-icon,
.popup-info-icon {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #111;
    font-size: 22px;
    background: #f8efdd;
    border-radius: 50%;
}

.holiday-info-row p,
.holiday-info-item p,
.popup-info-row p,
.popup-info-item p {
    margin: 0;
    font-size: clamp(13px, 1.05vw, 15px);
    line-height: 1.45;
}

.holiday-divider {
    display: none;
}

.holiday-popup-right .holiday-greeting,
.holiday-popup-content .holiday-greeting {
    margin: 2px 0 0;
    color: #176136;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

/* Close button */

.holiday-popup-close {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #111;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    background: #f0f0f0;
    border: 0;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.holiday-popup-close:hover,
.holiday-popup-close:focus-visible {
    color: #fff;
    background: #0b5131;
    outline: none;
    transform: rotate(90deg);
}

/* Checkbox */

.holiday-checkbox,
.popup-checkbox {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: #181a20;
    font-size: 13px;
    cursor: pointer;
}

.holiday-checkbox input,
.popup-checkbox input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #176136;
    cursor: pointer;
}

.holiday-checkbox-custom {
    display: none;
}

/* Tablet */

@media (max-width: 900px) and (min-width: 769px) {
    .holiday-popup-window {
        width: min(720px, calc(100% - 32px));
        height: min(540px, calc(100vh - 32px));
        min-height: 480px;
    }

    .holiday-popup-right,
    .holiday-popup-content {
        padding: 24px 28px;
    }
}

/* Mobile */

@media (max-width: 768px) {
    #holiday-popup {
        box-sizing: border-box;
        padding: 0;
    }

    .holiday-popup-window {
        position: absolute;
        top: 50%;
        left: 50%;
        display: flex;
        flex-direction: column;
        width: min(360px, calc(100% - 40px));
        max-width: none;
        height: min(560px, calc(100vh - 96px));
        height: min(560px, calc(100dvh - 96px));
        max-height: calc(
            100dvh
            - max(48px, env(safe-area-inset-top))
            - max(48px, env(safe-area-inset-bottom))
        );
        min-height: 0;
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
        transform: translate(-50%, -50%);
        animation: holiday-popup-mobile-in 0.3s ease both;
        scrollbar-width: thin;
        scrollbar-color: rgba(6, 71, 41, 0.35) transparent;
    }

    .holiday-popup-left,
    .holiday-popup-image {
        flex: 0 0 135px;
        width: 100%;
        height: 135px;
        min-height: 135px;
    }

    .holiday-popup-left img,
    .holiday-popup-image img {
        object-position: center 58%;
    }

    .holiday-image-overlay {
        top: 14%;
        width: 72%;
    }

    .holiday-script-title {
        font-size: 34px;
    }

    .holiday-main-title {
        font-size: 36px;
    }

    .holiday-small-title {
        margin-top: 6px;
        font-size: 9px;
    }

    .holiday-sun-decoration {
        width: 110px;
        height: 12px;
        margin-top: 7px;
    }

    .holiday-popup-right,
    .holiday-popup-content {
        flex: 0 0 auto;
        justify-content: flex-start;
        width: 100%;
        padding: 22px 18px 20px;
    }

    .holiday-popup-right::after,
    .holiday-popup-content::after {
        width: 150px;
        height: 150px;
    }

    .holiday-popup-right h2,
    .holiday-popup-content h2 {
        margin-bottom: 28px;
        padding: 0 36px;
        font-size: clamp(25px, 8vw, 30px);
    }

    .holiday-popup-right h2::after,
    .holiday-popup-content h2::after {
        bottom: -14px;
        width: 55%;
    }

    .holiday-popup-right p,
    .holiday-popup-content p {
        margin-bottom: 9px;
        font-size: 15px;
        line-height: 1.4;
    }

    .holiday-closure-message {
        gap: 9px;
        margin-bottom: 9px;
    }

    .holiday-closure-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .holiday-dates,
    .popup-dates {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 4px 0 10px;
    }

    .holiday-date,
    .popup-date {
        min-height: 108px;
        padding: 10px 6px;
        border-radius: 12px;
    }

    .holiday-date strong,
    .popup-date strong {
        margin-bottom: 4px;
        font-size: 16px;
    }

    .holiday-date span,
    .popup-date span {
        font-size: 14px;
    }

    .holiday-icon,
    .holiday-date-icon,
    .popup-date-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 5px;
    }

    .holiday-info,
    .popup-info {
        margin-bottom: 6px;
    }

    .holiday-info-row,
    .holiday-info-item,
    .popup-info-row,
    .popup-info-item {
        align-items: center;
        gap: 10px;
        min-height: 48px;
        padding: 5px 0;
        font-size: 13px;
        line-height: 1.35;
    }

    .holiday-info-icon,
    .popup-info-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .holiday-popup-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        color: #111;
        font-size: 28px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    }

    .holiday-checkbox,
    .popup-checkbox {
        min-height: 44px;
        margin-top: 5px;
        font-size: 13px;
    }

    .holiday-checkbox input,
    .popup-checkbox input {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
    }
}

@keyframes holiday-popup-mobile-in {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 12px)) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Very small phones */

@media (max-width: 360px) {
    .holiday-popup-left,
    .holiday-popup-image {
        flex-basis: 120px;
        height: 120px;
        min-height: 120px;
    }

    .holiday-popup-right,
    .holiday-popup-content {
        padding: 18px 14px 16px;
    }

    .holiday-popup-right h2,
    .holiday-popup-content h2 {
        font-size: 24px;
    }

    .holiday-date,
    .popup-date {
        min-height: 102px;
    }

    .holiday-date strong,
    .popup-date strong {
        font-size: 15px;
    }

    .holiday-date span,
    .popup-date span {
        font-size: 13px;
    }
}

/* Short landscape phones */

@media (max-width: 768px) and (max-height: 560px) {
    .holiday-popup-left,
    .holiday-popup-image {
        flex-basis: 95px;
        height: 95px;
        min-height: 95px;
    }

    .holiday-image-overlay {
        top: 12%;
        transform: translateX(-50%) scale(0.82);
    }
}

@media (prefers-reduced-motion: reduce) {
    .holiday-popup-window {
        animation: none;
    }

    .holiday-popup-close {
        transition: none;
    }
}
