/* «Олаф и тайна Нового года» — новогодний квест 26.12 (Армавир) и
   27.12 (Кропоткин). Страница регистрации по образцу samovar-fest.html. */

:root {
    --ng-navy: #0f3077;
    --ng-blue: #1189bf;
    --ng-blue-soft: #eef7fc;
    --ng-yellow: #fdbd24;
    --ng-yellow-soft: #fff6dc;
    --ng-text: #1b2733;
    --ng-muted: #5b6672;
    --ng-placeholder: #8a94a3;
    --ng-border: #cfe3ec;
    --ng-error: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.ng-page {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    color: var(--ng-text);
    background: linear-gradient(180deg, #e3f1fa 0%, #f6fbfe 420px, #ffffff 100%);
    line-height: 1.5;
    min-height: 100vh;
}

.ng-main {
    max-width: 560px;
    margin: 0 auto;
}

.ng-poster img {
    display: block;
    width: 100%;
    height: auto;
}

.ng-content {
    background: #ffffff;
    padding: 28px 20px 40px;
}

/* ---------- Вступление ---------- */
.ng-eyebrow {
    display: inline-block;
    background: var(--ng-yellow);
    color: var(--ng-navy);
    font-weight: 800;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.ng-title {
    color: var(--ng-navy);
    font-size: clamp(26px, 6vw, 34px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
    text-wrap: balance;
}

.ng-lead {
    color: #3c4a5c;
    font-size: 16px;
}

/* ---------- Даты ---------- */
.ng-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.ng-date {
    background: var(--ng-blue-soft);
    border-radius: 18px;
    padding: 14px 14px 16px;
}

.ng-date__city {
    color: var(--ng-blue);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ng-date__day {
    color: var(--ng-navy);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
    margin: 4px 0 4px;
}

.ng-date__addr {
    color: var(--ng-muted);
    font-size: 14px;
    line-height: 1.35;
}

.ng-date__phone {
    display: inline-block;
    margin-top: 8px;
    color: var(--ng-navy);
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.ng-date__phone:hover {
    text-decoration: underline;
}

/* ---------- Цена ---------- */
.ng-price {
    margin-top: 12px;
    background: var(--ng-yellow-soft);
    border-radius: 18px;
    padding: 14px 16px;
}

.ng-price__title {
    color: var(--ng-navy);
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 6px;
}

.ng-price__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 15px;
    padding: 3px 0;
}

.ng-price__row strong {
    color: var(--ng-navy);
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
}

/* ---------- Форма ---------- */
.ng-form-section {
    margin-top: 32px;
}

.ng-form-title {
    color: var(--ng-navy);
    font-size: 24px;
    font-weight: 900;
}

.ng-form-note {
    color: var(--ng-muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.ng-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ng-form[hidden] {
    display: none;
}

.ng-group {
    border: none;
    min-width: 0;
}

.ng-label {
    display: block;
    color: var(--ng-navy);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
    padding: 0;
}

.ng-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ng-choice {
    position: relative;
    display: flex;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Сама радиокнопка скрыта, но остаётся в фокусе с клавиатуры */
.ng-choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ng-choice__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px 12px 40px;
    border: 2px solid var(--ng-border);
    border-radius: 16px;
    background: #ffffff;
    position: relative;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Кружок-индикатор выбора */
.ng-choice__body::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 15px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #a9c7d6;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ng-choice:hover .ng-choice__body {
    border-color: #9fcfe6;
}

.ng-choice input:checked + .ng-choice__body {
    border-color: var(--ng-blue);
    background: var(--ng-blue-soft);
}

.ng-choice input:checked + .ng-choice__body::before {
    border-color: var(--ng-blue);
    box-shadow: inset 0 0 0 4px #ffffff;
    background: var(--ng-blue);
}

.ng-choice input:focus-visible + .ng-choice__body {
    box-shadow: 0 0 0 4px rgba(17, 137, 191, 0.2);
}

.ng-choice__title {
    color: var(--ng-navy);
    font-weight: 800;
    font-size: 15px;
    line-height: 1.3;
}

.ng-choice__text {
    color: var(--ng-muted);
    font-size: 13px;
    line-height: 1.4;
}

.ng-choice__price {
    color: var(--ng-blue);
    font-weight: 800;
    font-size: 14px;
}

.ng-group.error .ng-choice__body {
    border-color: var(--ng-error);
}

.ng-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--ng-border);
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    color: var(--ng-text);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.ng-input::placeholder {
    color: var(--ng-placeholder);
}

.ng-input:focus {
    outline: none;
    border-color: var(--ng-blue);
    box-shadow: 0 0 0 4px rgba(17, 137, 191, 0.15);
}

.ng-input.error {
    border-color: var(--ng-error);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.12);
}

.ng-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231189bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 34px;
}

.ng-select:invalid {
    color: var(--ng-placeholder);
}

.ng-select option {
    color: var(--ng-text);
}

/* ---------- Дети ---------- */
.ng-children {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ng-child-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ng-child-row input {
    flex: 1.5;
    min-width: 0;
}

.ng-child-row select {
    flex: 1;
    min-width: 0;
}

.ng-remove-child {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--ng-border);
    background: #ffffff;
    color: var(--ng-placeholder);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ng-remove-child:hover {
    background: #fdeceb;
    border-color: var(--ng-error);
    color: var(--ng-error);
}

.ng-add-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    margin-top: 10px;
    padding: 10px 16px;
    background: var(--ng-blue-soft);
    border: 2px dashed var(--ng-blue);
    border-radius: 16px;
    color: var(--ng-navy);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ng-add-child:hover {
    background: #e0f0f9;
}

.ng-add-child[hidden] {
    display: none;
}

.ng-add-child__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ng-blue);
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
}

/* ---------- Итог, согласия, отправка ---------- */
.ng-total {
    background: var(--ng-yellow-soft);
    border-left: 4px solid var(--ng-yellow);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--ng-navy);
    font-size: 16px;
}

.ng-total strong {
    font-weight: 900;
}

.ng-total[hidden] {
    display: none;
}

.ng-consents {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ng-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ng-muted);
    cursor: pointer;
}

.ng-consent input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--ng-blue);
    cursor: pointer;
}

.ng-consent.error {
    color: var(--ng-error);
}

.ng-consent a {
    color: var(--ng-blue);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.ng-submit {
    width: 100%;
    padding: 18px;
    background: var(--ng-yellow);
    color: var(--ng-navy);
    border: none;
    border-radius: 16px;
    font-family: inherit;
    font-size: 19px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ng-submit:hover {
    box-shadow: 0 10px 24px rgba(15, 48, 119, 0.18);
    transform: translateY(-1px);
}

.ng-submit:active {
    transform: translateY(1px);
}

.ng-submit:disabled {
    background: #f1dca3;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ng-submit-note {
    margin-top: -8px;
    text-align: center;
    color: var(--ng-muted);
    font-size: 13px;
}

.ng-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ng-success {
    text-align: center;
    padding: 28px 8px 8px;
}

.ng-success__icon {
    font-size: 56px;
    margin-bottom: 10px;
}

.ng-success__title {
    color: var(--ng-navy);
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 8px;
}

.ng-success__text {
    color: #3c4a5c;
    font-size: 16px;
    line-height: 1.6;
}

/* ---------- Планшет и десктоп: афиша слева, форма справа ---------- */
@media (min-width: 600px) {
    .ng-main {
        margin: 24px auto;
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 0 60px rgba(15, 64, 123, 0.1);
    }

    .ng-content {
        padding: 32px 36px 40px;
    }
}

@media (min-width: 960px) {
    .ng-main {
        max-width: 1120px;
        display: grid;
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
        align-items: start;
        gap: 32px;
        padding: 0 24px;
        margin: 32px auto;
        overflow: visible;
        box-shadow: none;
        border-radius: 0;
    }

    .ng-poster {
        position: sticky;
        top: 24px;
    }

    .ng-poster img {
        border-radius: 24px;
        box-shadow: 0 18px 50px rgba(15, 64, 123, 0.18);
    }

    .ng-content {
        border-radius: 24px;
        box-shadow: 0 0 60px rgba(15, 64, 123, 0.1);
        padding: 36px 40px 44px;
    }
}

/* Узкие телефоны: карточки выбора и даты — в столбик */
@media (max-width: 400px) {
    .ng-dates,
    .ng-choices {
        grid-template-columns: 1fr;
    }
}
