@import url("https://fonts.googleapis.com/css2?family=Tektur:wght@400;600;700&family=Noto+Sans:wght@400;500;700&family=Golos+Text:wght@400;500&display=swap");

/* ==========================================================================
   ZeroNights — виджет покупки билетов
   Стили выполнены по макету Figma (ZeroNights_2026_30сентября)
   Все классы имеют префикс pw- (pay-widget), чтобы не конфликтовать со стилями Тильды.
   ========================================================================== */

/*
 * Переменные объявлены и на .pay-widget, и на .pw-overlay.
 * Модальная панель (.pw-overlay) при открытии добавляется в document.body,
 * то есть оказывается ВНЕ дерева .pay-widget — без дублирования здесь
 * все var(--pw-*) внутри неё были бы не определены (значения "голых" полей на скриншоте).
 */
.pay-widget,
.pw-overlay {
    --pw-bg: #000000;
    --pw-accent: #00ff8c;
    --pw-border: #d9d9d9;
    --pw-error: #ff383c;
    --pw-white: #ffffff;
    --pw-teal: #0cb1ae;
    --pw-tarif-bg: #00ff8a;
    --pw-overlay: rgba(0, 0, 0, 0.75);

    --pw-font-head: "Tektur", sans-serif;
    --pw-font-body: "Noto Sans", sans-serif;
    --pw-font-input: "Golos Text", "Noto Sans", sans-serif;
}

.pay-widget {
    position: relative;
    font-family: var(--pw-font-body);
    color: var(--pw-white);
    box-sizing: border-box;
}

.pay-widget *,
.pay-widget *::before,
.pay-widget *::after,
.pw-overlay *,
.pw-overlay *::before,
.pw-overlay *::after {
    box-sizing: border-box;
}

.pay-widget button {
    font-family: inherit;
    cursor: pointer;
}

.pay-widget a {
    color: var(--pw-accent);
}

/* ---------- Точка входа — карточки тарифов (копия блока с zeronights.ru/#ticket) ---------- */

.pw-ticket-block {
    width: 100%;
    background: transparent;
    padding: 0;
}

.pw-entry {
    display: flex;
    flex-direction: column;
    gap: 40px;
    color: #000000;
    font-family: var(--pw-font-body);
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 1023px) {
    .pw-entry {
        max-width: 960px;
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .pw-entry {
        max-width: 720px;
        gap: 32px;
    }
}

.pw-tarif-card {
    display: grid;
    grid-template-columns: 328px 380px 2px minmax(0, 325px);
    align-items: start;
    column-gap: 30px;
    background: var(--pw-tarif-bg);
    padding: 32px;
    min-height: 278px;
}

.pw-tarif-card--clickable {
    cursor: pointer;
}

.pw-tarif-card__icon {
    width: 328px;
    height: 214px;
    background: #000000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-tarif-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pw-tarif-card__info {
    width: 100%;
    min-width: 0;
}

.pw-tarif-card__title {
    font-family: var(--pw-font-head);
    font-weight: 600;
    font-size: 32px;
    line-height: 43px;
    color: #000000;
    margin: 0;
}

.pw-tarif-card__desc {
    font-size: 18px;
    line-height: 24px;
    color: #000000;
    margin: 20px 0 0;
}

.pw-tarif-card__divider {
    width: 2px;
    height: 214px;
    align-self: start;
    background: #000000;
}

.pw-tarif-card__pricing {
    width: 325px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pw-tarif-card__price-row + .pw-tarif-card__price-row {
    margin-top: 24px;
}

.pw-tarif-card__price {
    display: block;
    font-family: var(--pw-font-head);
    font-weight: 600;
    font-size: 52px;
    line-height: 62px;
    color: #000000;
    white-space: nowrap;
}

.pw-tarif-card__price-row--secondary .pw-tarif-card__price {
    font-size: 30px;
    line-height: 36px;
}

.pw-tarif-card__price-label {
    display: block;
    font-size: 18px;
    line-height: 22px;
    color: #000000;
}

.pw-tarif-card__btn {
    margin-top: 16px;
    width: 188px;
    height: 48px;
    border: none;
    background: #000000;
    color: #ffffff;
    font-family: var(--pw-font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.pw-tarif-card__btn:hover {
    background: #111111;
}

@media (max-width: 1023px) {
    .pw-tarif-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 24px;
        min-height: 0;
    }
    .pw-tarif-card__icon {
        width: 100%;
        height: auto;
        aspect-ratio: 657 / 429;
        justify-self: stretch;
    }
    .pw-tarif-card__divider {
        display: none;
    }
    .pw-tarif-card__title {
        font-size: 24px;
        line-height: 32px;
    }
    .pw-tarif-card__desc {
        margin-top: 8px;
    }
    .pw-tarif-card__price {
        font-size: 52px;
        line-height: 62px;
    }
    .pw-tarif-card__price-row--secondary .pw-tarif-card__price {
        font-size: 30px;
        line-height: 36px;
    }
    .pw-tarif-card__pricing {
        width: 100%;
    }

    .pw-tarif-card__btn {
        width: 100%;
        height: 48px;
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .pw-tarif-card {
        gap: 10px;
        padding: 20px;
        height: auto;
        min-height: 0;
    }

    .pw-tarif-card__icon {
        width: 100%;
    }

    .pw-tarif-card__pricing {
        width: 100%;
    }

    .pw-tarif-card__btn {
        width: 100%;
        font-size: 16px;
    }
}

@media (max-width: 639px) {
    .pw-tarif-card__title {
        line-height: 32px;
    }

    .pw-tarif-card__price {
        font-size: 42px;
        line-height: 50px;
    }

    .pw-tarif-card__price-row--secondary .pw-tarif-card__price {
        font-size: 26px;
        line-height: 31px;
    }

    .pw-tarif-card__btn {
        height: 42px;
        font-size: 14px;
    }
}

@media (max-width: 479px) {
    .pw-tarif-card {
        padding: 20px;
    }

    .pw-tarif-card__title {
        font-size: 26px;
        line-height: 35px;
    }

    .pw-tarif-card__pricing {
        width: 100%;
    }

    .pw-tarif-card__price {
        font-size: 40px;
        line-height: 48px;
    }

    .pw-tarif-card__btn {
        width: 100%;
        height: 42px;
        font-size: 14px;
    }
}

/* ---------- Оверлей и модальная панель ---------- */

.pw-overlay {
    position: fixed;
    inset: 0;
    background: var(--pw-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100000;
    overflow-y: auto;
    font-family: var(--pw-font-body);
    color: var(--pw-white);
}

.pw-overlay a {
    color: var(--pw-accent);
}

.pw-overlay[hidden] {
    display: none;
}

.pw-panel {
    position: relative;
    width: 100%;
    max-width: 629px;
    background: var(--pw-bg);
    border: 2px solid var(--pw-accent);
    padding: 56px;
    overflow: hidden;
    margin: auto;
}

.pw-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.pw-close img {
    width: 19px;
    height: 19px;
    display: block;
}

@media (max-width: 640px) {
    .pw-overlay {
        padding: 0;
        align-items: flex-start;
    }
    .pw-panel {
        min-height: 100%;
        max-width: none;
        border-width: 0;
        padding: 84px 20px 32px;
    }
    .pw-close {
        top: 27px;
        right: 20px;
    }
}

/* ---------- Шапка (дата/место + логотип) ---------- */

.pw-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 32px;
}

.pw-head__logo {
    width: 220px;
    max-width: 70%;
    height: auto;
    display: block;
}

.pw-head__meta {
    font-family: var(--pw-font-head);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.4;
    color: var(--pw-white);
    margin: 0;
}

/* ---------- Общие текстовые блоки ---------- */

.pw-title {
    font-family: var(--pw-font-head);
    font-weight: 600;
    font-size: 42px;
    line-height: 1;
    color: var(--pw-accent);
    margin: 0 0 24px;
}

@media (max-width: 640px) {
    .pw-title {
        font-size: 32px;
    }
}

.pw-subtitle {
    font-size: 18px;
    color: var(--pw-border);
    margin: -8px 0 24px;
}

.pw-hint {
    font-size: 16px;
    line-height: 1.3;
    color: var(--pw-border);
    margin: 0 0 24px;
}

.pw-section-title {
    font-family: var(--pw-font-head);
    font-weight: 600;
    font-size: 32px;
    color: var(--pw-accent);
    margin: 0 0 24px;
}

.pw-participant-title {
    font-family: var(--pw-font-head);
    font-weight: 600;
    font-size: 18px;
    color: var(--pw-accent);
    margin: 24px 0 16px;
}

/* ---------- Строка выбора количества билетов ---------- */

.pw-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-bottom: 24px;
}

.pw-qty-row__label {
    font-size: 18px;
    color: var(--pw-border);
    flex: 1 1 auto;
}

.pw-qty-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 0 0 auto;
}

.pw-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--pw-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.pw-qty-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    background: var(--pw-border);
    transform: translate(-50%, -50%);
}

.pw-qty-btn--plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 18px;
    background: var(--pw-border);
    transform: translate(-50%, -50%);
}

.pw-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pw-qty-value {
    width: 48px;
    height: 48px;
    border: 1px solid var(--pw-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--pw-font-body);
    font-weight: 700;
    font-size: 18px;
    color: var(--pw-white);
    flex-shrink: 0;
}

.pw-qty-value--sm {
    width: 32px;
    height: 32px;
}

/* ---------- Строка счётчика билетов у юрлиц (в отличие от student/individual — с рамкой, как остальные поля) ---------- */

.pw-legal-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    height: 48px;
    border: 1px solid var(--pw-border);
    padding: 0 12px 0 24px;
    margin-bottom: 16px;
}

.pw-legal-ticket-row__label {
    font-family: var(--pw-font-input);
    font-size: 14px;
    color: var(--pw-border);
    flex: 1 1 auto;
}

/* ---------- Поля ввода ---------- */

.pw-field {
    margin-bottom: 16px;
}

.pw-field__label {
    display: block;
    font-size: 14px;
    color: var(--pw-border);
    margin-bottom: 8px;
}

.pw-input,
.pw-textarea {
    width: 100%;
    height: 48px;
    border: 1px solid var(--pw-border);
    background: transparent;
    color: var(--pw-white);
    font-family: var(--pw-font-input);
    font-size: 14px;
    padding: 0 24px;
    outline: none;
}

.pw-input::placeholder,
.pw-textarea::placeholder {
    color: var(--pw-border);
}

.pw-textarea {
    height: auto;
    min-height: 96px;
    padding: 16px 24px;
    resize: vertical;
    line-height: 1.4;
}

.pw-input:focus,
.pw-textarea:focus {
    border-color: var(--pw-accent);
}

.pw-input.pw-invalid,
.pw-textarea.pw-invalid {
    border-color: var(--pw-error);
    color: var(--pw-error);
}

.pw-input.pw-invalid::placeholder,
.pw-textarea.pw-invalid::placeholder {
    color: var(--pw-error);
}

.pw-promo-input {
    width: 100%;
    max-width: 296px;
}

.pw-promo-input::placeholder {
    color: var(--pw-white);
}

.pw-error-text {
    display: block;
    font-size: 12px;
    color: var(--pw-error);
    margin-top: 6px;
}

/* ---------- Кастомный select (Отрасль компании) ---------- */

.pw-select {
    position: relative;
}

.pw-select__control {
    width: 100%;
    height: 48px;
    border: 1px solid var(--pw-border);
    background: transparent;
    color: var(--pw-border);
    font-family: var(--pw-font-input);
    font-size: 14px;
    padding: 0 10px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pw-select__control.pw-select--filled {
    color: var(--pw-white);
}

.pw-select__chevron {
    width: 19px;
    height: 11px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.pw-select.pw-open .pw-select__chevron {
    transform: rotate(180deg);
}

.pw-select__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: #000000;
    border: 1px solid var(--pw-border);
    max-height: 260px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}

.pw-select.pw-open .pw-select__panel {
    display: block;
}

.pw-select__option {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--pw-white);
    cursor: pointer;
}

.pw-select__option:hover,
.pw-select__option.pw-active {
    background: rgba(0, 255, 140, 0.12);
    color: var(--pw-accent);
}

/* ---------- Итоговая сумма ---------- */

.pw-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--pw-white);
    color: #000000;
    padding: 24px;
    margin-bottom: 24px;
    gap: 16px;
}

.pw-total__label {
    font-family: var(--pw-font-head);
    font-weight: 700;
    font-size: 24px;
}

.pw-total__value {
    font-family: var(--pw-font-head);
    font-weight: 700;
    font-size: 32px;
    white-space: nowrap;
}

.pw-total__discount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px 0;
    margin: -16px 0 24px;
    font-size: 14px;
}

/* ---------- Кнопки действий ---------- */

.pw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 40px;
    font-family: var(--pw-font-body);
    font-weight: 500;
    font-size: 20px;
    text-align: center;
    border: 2px solid var(--pw-accent);
    background: var(--pw-accent);
    color: #000000;
    transition: opacity 0.15s ease;
}

.pw-btn:disabled {
    border-color: var(--pw-border);
    background: transparent;
    color: var(--pw-border);
    cursor: not-allowed;
}

.pw-btn--outline {
    background: transparent;
    color: var(--pw-accent);
}

.pw-btn + .pw-btn {
    margin-top: 24px;
}

.pw-btn.pw-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ---------- Уведомление о лимите билетов ---------- */

.pw-limit-alert {
    border: 2px solid var(--pw-error);
    color: var(--pw-error);
    padding: 16px 24px;
    text-align: center;
    font-size: 16px;
    margin-bottom: 24px;
}

/* ---------- Чекбоксы согласий ---------- */

.pw-consents {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.pw-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    cursor: pointer;
}

.pw-checkbox-box {
    width: 16px;
    height: 16px;
    border: 1px solid var(--pw-accent);
    flex-shrink: 0;
    position: relative;
    margin-top: 1px;
}

.pw-checkbox-box img {
    position: absolute;
    inset: 3px;
    width: 10px;
    height: 8px;
    display: none;
}

.pw-checkbox-row.pw-checked .pw-checkbox-box img {
    display: block;
}

.pw-checkbox-row.pw-invalid .pw-checkbox-box {
    border-color: var(--pw-error);
}

.pw-checkbox-text {
    font-size: 12px;
    line-height: 1.2;
    color: var(--pw-border);
}

.pw-checkbox-text a {
    text-decoration: underline;
    color: var(--pw-accent);
}

/* ---------- Блок "Отправка на e-mail анкет" ---------- */

.pw-notify-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 16px 0 24px;
    cursor: pointer;
}

.pw-notify-row .pw-checkbox-text {
    font-size: 12px;
}

/* ---------- Загрузка файла ---------- */

.pw-file-field {
    margin-bottom: 16px;
}

.pw-file-box {
    height: 48px;
    border: 1px solid var(--pw-border);
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 24px;
}

.pw-file-browse {
    border: 1px solid var(--pw-border);
    background: transparent;
    color: var(--pw-border);
    font-family: var(--pw-font-input);
    font-size: 14px;
    padding: 8px 24px;
    flex-shrink: 0;
}

.pw-file-name {
    font-family: var(--pw-font-input);
    font-size: 14px;
    color: var(--pw-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pw-file-name.pw-has-file {
    color: var(--pw-white);
}

.pw-file-field.pw-invalid .pw-file-box {
    border-color: var(--pw-error);
}

/* ---------- Экран успеха / ошибки ---------- */

.pw-result {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pw-result__title {
    font-family: var(--pw-font-head);
    font-weight: 600;
    font-size: 32px;
    color: var(--pw-accent);
    margin: 0;
}

.pw-result__text {
    font-size: 24px;
    color: var(--pw-white);
    margin: 0;
}

.pw-result__actions {
    display: flex;
    flex-direction: column;
}

/* ---------- Прочее ---------- */

.pw-footer-note {
    font-size: 14px;
    color: var(--pw-border);
    margin-top: 24px;
}

.pw-footer-note a {
    color: var(--pw-accent);
    text-decoration: underline;
}

.pw-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000000;
    border-radius: 50%;
    animation: pw-spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: -3px;
}

@keyframes pw-spin {
    to {
        transform: rotate(360deg);
    }
}

.pw-status-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 24px 0;
}
