.night-sale-popup.hidden,
.night-sale-popup__success.hidden,
.night-sale-popup__form.hidden {
    display: none;
}

body.night-sale-popup-open {
    overflow: hidden;
}

.night-sale-popup {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.72);
}

.night-sale-popup__dialog {
    position: relative;
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.night-sale-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-dark);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.night-sale-popup__close:hover {
    background: rgba(15, 23, 42, 0.14);
}

.night-sale-popup__media {
    min-height: 100%;
    background: linear-gradient(180deg, #d7efff 0%, #edf8ff 100%);
}

.night-sale-popup__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.night-sale-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 36px;
}

.night-sale-popup__title {
    margin: 0 0 16px;
    color: var(--text-dark);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.night-sale-popup__text {
    margin: 0 0 24px;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
}

.night-sale-popup__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.night-sale-popup__input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-dark);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.night-sale-popup__input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.night-sale-popup__button {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: 14px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.night-sale-popup__button:hover {
    opacity: 0.92;
}

.night-sale-popup__button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.night-sale-popup__hint {
    margin: 0;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.night-sale-popup__success {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
}

@media (max-width: 900px) {
    .night-sale-popup__dialog {
        max-width: 640px;
        grid-template-columns: 1fr;
    }

    .night-sale-popup__media {
        max-height: 280px;
    }

    .night-sale-popup__content {
        padding: 28px 22px 24px;
    }

    .night-sale-popup__title {
        font-size: 24px;
    }
}

@media (max-width: 520px) {
    .night-sale-popup {
        padding: 10px;
    }

    .night-sale-popup__media {
        max-height: 220px;
    }

    .night-sale-popup__content {
        padding: 22px 16px 18px;
    }

    .night-sale-popup__title {
        padding-right: 36px;
        font-size: 22px;
    }

    .night-sale-popup__text {
        font-size: 15px;
        margin-bottom: 18px;
    }

    .night-sale-popup__input,
    .night-sale-popup__button {
        font-size: 15px;
    }
}
