:root {
    --bg-1: #071022;
    --bg-2: #0e1838;
    --bg-3: #132051;
    --panel: rgba(13, 20, 45, 0.74);
    --panel-strong: rgba(247, 248, 255, 0.95);
    --text: #f7fbff;
    --muted: rgba(238, 246, 255, 0.72);
    --cyan: #00a9f4;
    --violet: #9a1aff;
    --blue-deep: #123886;
    --border: rgba(164, 208, 255, 0.16);
    --shadow: 0 24px 70px rgba(5, 10, 35, 0.34);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --safe-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.calculator-body {
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 169, 244, 0.22), transparent 34%),
        radial-gradient(circle at 84% 14%, rgba(154, 26, 255, 0.16), transparent 28%),
        radial-gradient(circle at 50% 70%, rgba(33, 89, 211, 0.18), transparent 32%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 54%, var(--bg-3) 100%);
}

.calculator-page {
    width: min(1240px, calc(100% - 32px));
    max-width: 100%;
    margin: 0 auto;
    padding: 28px 0 56px;
    overflow-x: hidden;
}

.calculator-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(247, 248, 255, 0.97), rgba(235, 239, 255, 0.92));
    box-shadow: var(--shadow);
    color: #1f2341;
}

.hero-copy {
    max-width: 740px;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--cyan);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3.4vw, 3.45rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 10px 0 0;
    max-width: 66ch;
    color: rgba(31, 35, 65, 0.78);
    font-size: 0.96rem;
    line-height: 1.5;
}

.language-menu {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.language-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
    color: #f7fbff;
    background: rgba(8, 14, 34, 0.74);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
    cursor: pointer;
}

.language-toggle__flag,
.language-option__flag {
    font-size: 1.1rem;
    line-height: 1;
}

.language-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 64px;
    padding: 8px;
    display: grid;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(7, 11, 27, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    z-index: 12;
}

.language-panel[hidden] {
    display: none !important;
}

.language-option {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(243, 247, 255, 0.72);
}

.language-option.is-active {
    background: linear-gradient(135deg, rgba(0, 169, 244, 0.2), rgba(154, 26, 255, 0.24));
    color: #f7fbff;
}

.language-option:hover {
    color: #fff;
}

.alert {
    margin: 16px 0 0;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.alert-success {
    background: rgba(30, 135, 94, 0.18);
    border-color: rgba(81, 205, 145, 0.3);
}

.alert-warning {
    background: rgba(140, 110, 30, 0.18);
    border-color: rgba(237, 195, 83, 0.34);
}

.alert-error {
    background: rgba(145, 44, 62, 0.18);
    border-color: rgba(255, 126, 142, 0.28);
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
    gap: 20px;
    margin-top: 20px;
}

.calculator-request-layout {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
}

.calculator-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calculator-panel--form {
    padding: 22px;
    display: flex;
}

.calculator-panel--summary {
    position: sticky;
    top: 18px;
    height: fit-content;
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(247, 248, 255, 0.98), rgba(235, 239, 255, 0.94));
    color: #1f2341;
}

.calculator-panel--request {
    padding: 22px;
}

.request-confirmation {
    display: grid;
    gap: 14px;
    justify-items: end;
    min-height: 100%;
    padding: 26px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(0, 169, 244, 0.12), rgba(154, 26, 255, 0.12));
    border: 1px solid rgba(164, 208, 255, 0.18);
}

.request-confirmation h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.request-confirmation p {
    margin: 0;
    color: rgba(247, 248, 255, 0.88);
    line-height: 1.6;
}

.request-confirmation__redirect {
    margin-top: 4px;
    color: rgba(247, 248, 255, 0.72);
    font-size: 0.95rem;
}

.form-block + .form-block {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.block-head h2,
.summary-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.block-head p,
.summary-head p,
.field small,
.muted {
    color: rgba(31, 35, 65, 0.64);
}

.block-head p,
.summary-head p {
    margin: 8px 0 0;
    line-height: 1.55;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field--full {
    grid-column: 1 / -1;
}

.field span {
    font-weight: 700;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid rgba(16, 27, 64, 0.18);
    border-radius: 16px;
    padding: 14px 15px;
    font: inherit;
    color: #1f2341;
    background: rgba(255, 255, 255, 0.92);
    outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: rgba(0, 169, 244, 0.8);
    box-shadow: 0 0 0 4px rgba(0, 169, 244, 0.12);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.quick-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    width: 100%;
}

.calculator-panel--form .form-block--options {
    margin-top: 18px;
    padding-top: 18px;
}

.radio-card,
.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 112px;
    padding: 18px 16px 16px;
    border-radius: 18px;
    border: 1px solid rgba(16, 27, 64, 0.16);
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    color: #1f2341;
}

.radio-card input,
.option-card input {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    margin: 0;
}

.radio-card span,
.option-card__label {
    padding-left: 26px;
}

.option-card__label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    line-height: 1.22;
}

.option-card__label-strong {
    font-weight: 800;
}

.option-card__label-plain {
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.2;
}

.option-card__label-note {
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.2;
}

.option-card .option-note {
    padding-left: 26px;
    font-size: 0.86rem;
    line-height: 1.35;
}

.option-card .option-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.radio-card:has(input:checked),
.option-card:has(input:checked) {
    border-color: rgba(0, 169, 244, 0.7);
    background: linear-gradient(135deg, rgba(0, 169, 244, 0.78), rgba(154, 26, 255, 0.78));
    color: #fff;
}

.option-card:has(input:checked) .muted,
.option-card:has(input:checked) strong,
.option-card:has(input:checked) .option-note,
.option-card:has(input:checked) span,
.option-card:has(input:checked) * {
    color: #fff;
}

.option-card:has(input:checked) .muted {
    opacity: 0.88;
}

.option-card:has(input:checked) .option-note a {
    text-decoration-color: rgba(255, 255, 255, 0.82);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    justify-content: flex-end;
}

.actions--split {
    justify-content: space-between;
}

.primary-button,
.secondary-button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    min-height: 48px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 14px 30px rgba(0, 169, 244, 0.28);
}

.secondary-button {
    color: #1f2341;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
}

.primary-button:hover,
.secondary-button:hover,
.language-pill:hover {
    transform: translateY(-1px);
}

.summary-total {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(0, 169, 244, 0.82), rgba(154, 26, 255, 0.82));
    margin-top: 18px;
    color: #fff;
}

.summary-total span {
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.summary-total strong {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.summary-breakdown,
.summary-section {
    margin-top: 18px;
}

.summary-line,
.option-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(16, 27, 64, 0.1);
}

.summary-line:last-child,
.option-list li:last-child {
    border-bottom: 0;
}

.summary-line span,
.option-list span {
    color: rgba(31, 35, 65, 0.66);
}

.summary-section h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.calculator-panel--form .field span,
.calculator-panel--request .field span {
    color: #f7fbff;
}

.calculator-panel--form .block-head p,
.calculator-panel--request .block-head p {
    color: rgba(247, 248, 255, 0.9);
}

.calculator-panel--form .quick-fields .field small,
.calculator-panel--form .form-block--contact .field small,
.calculator-panel--request .field small,
.calculator-panel--request .muted {
    color: rgba(247, 248, 255, 0.82);
}

.calculator-panel--form .field input,
.calculator-panel--form .field textarea,
.calculator-panel--form .field select,
.calculator-panel--request .field input,
.calculator-panel--request .field textarea,
.calculator-panel--request .field select {
    border-color: rgba(164, 208, 255, 0.14);
}

.summary-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.summary-meta span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: #1f2341;
    font-weight: 700;
}

.option-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.option-list li strong {
    white-space: nowrap;
}

.field--wheel {
    position: relative;
}

.wheel-picker {
    display: none;
}

.calculator-mobile-bar {
    display: none;
}

@media (max-width: 980px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-panel--summary {
        position: static;
    }
}

@media (max-width: 720px) {
    html,
    body {
        overflow-x: hidden;
    }

    .calculator-page {
        width: min(100% - 18px, 1240px);
        padding-top: 12px;
        padding-bottom: calc(92px + var(--safe-bottom));
    }

    .calculator-hero {
        padding: 18px 16px;
        padding-right: 72px;
        position: relative;
        flex-direction: column;
        gap: 12px;
    }

    .hero-copy h1 {
        font-size: clamp(1.55rem, 6vw, 2.2rem);
        line-height: 1;
        max-width: 14ch;
    }

    .hero-copy p {
        margin-top: 10px;
        font-size: 0.9rem;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .language-menu {
        position: absolute;
        top: 18px;
        right: 16px;
        align-self: auto;
        margin-left: 0;
        z-index: 3;
    }

    .language-toggle {
        width: 44px;
        height: 44px;
    }

    .quick-fields,
    .options-grid {
        grid-template-columns: 1fr;
    }

    .quick-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .quick-fields .field {
        min-width: 0;
    }

    .quick-fields .field--date {
        grid-column: 1 / -1;
    }

    .quick-fields .field span {
        font-size: 0.68rem;
        line-height: 1.05;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .quick-fields .field input,
    .quick-fields .field select {
        padding: 10px 8px;
        min-height: 44px;
        font-size: 0.82rem;
        border-radius: 12px;
        width: 100%;
        min-width: 0;
    }

    .quick-fields .field input[type="date"] {
        padding-inline: 6px;
        font-size: 0.76rem;
        letter-spacing: -0.01em;
    }

    .quick-fields .field small {
        font-size: 0.68rem;
    }

    .quick-fields .field input[data-wheel-input] {
        display: none;
    }

    .wheel-picker {
        position: relative;
        display: block;
        height: 164px;
        overflow-y: auto;
        scroll-snap-type: y mandatory;
        overscroll-behavior: contain;
        border-radius: 24px;
        border: 1px solid rgba(164, 208, 255, 0.16);
        background: linear-gradient(180deg, rgba(9, 14, 34, 0.6), rgba(9, 14, 34, 0.82));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .wheel-picker::-webkit-scrollbar {
        display: none;
    }

    .wheel-picker__frame {
        position: sticky;
        top: 50%;
        transform: translateY(-50%);
        height: 42px;
        margin: 0 10px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: linear-gradient(135deg, rgba(0, 169, 244, 0.18), rgba(154, 26, 255, 0.18));
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
        pointer-events: none;
        z-index: 1;
    }

    .wheel-picker__list {
        display: grid;
        gap: 0;
        padding: 58px 0;
        position: relative;
        z-index: 0;
    }

    .wheel-picker__item {
        appearance: none;
        border: 0;
        background: transparent;
        color: rgba(247, 251, 255, 0.86);
        font: inherit;
        font-weight: 700;
        font-size: 1.05rem;
        line-height: 1;
        height: 44px;
        scroll-snap-align: center;
        text-align: center;
    }

    .wheel-picker__item.is-active {
        color: #f7fbff;
        font-size: 1.22rem;
        font-weight: 800;
        text-shadow: 0 0 16px rgba(0, 169, 244, 0.2);
    }

    .quick-fields .field--date input {
        height: 44px;
        padding-inline: 8px;
        font-size: 0.74rem;
    }

    .calculator-panel--form,
    .calculator-panel--summary {
        padding: 18px;
    }

    .calculator-form {
        justify-content: flex-start;
    }

    .form-block {
        margin-bottom: 18px;
    }

    .form-block + .form-block {
        margin-top: 18px;
        padding-top: 18px;
    }

    .options-grid {
        margin-top: 18px;
        gap: 10px;
    }

    .options-grid .option-card:first-child {
        margin-top: 6px;
    }

    .calculator-panel--form .form-block--contact {
        margin-top: 42px;
        padding-top: 24px;
    }

    .calculator-panel--form .form-block--options {
        margin-top: 24px;
        padding-top: 22px;
    }

    .summary-head h2 {
        font-size: 1.05rem;
    }

    .summary-total strong {
        font-size: clamp(1.5rem, 6vw, 2.1rem);
    }

    .summary-total {
        background: linear-gradient(135deg, rgba(0, 169, 244, 0.94), rgba(154, 26, 255, 0.94));
    }

    .summary-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: center;
    }

    .summary-meta span {
        font-size: 0.82rem;
        line-height: 1.15;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .summary-section[data-summary-section="event"] {
        margin-top: 28px;
    }

    .summary-section + .summary-section {
        margin-top: 26px;
    }

    .calculator-mobile-bar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: var(--safe-bottom);
        z-index: 60;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
        padding: 12px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(8, 14, 34, 0.88);
        backdrop-filter: blur(18px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
    }

    .calculator-mobile-bar__price {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .calculator-mobile-bar__price span {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: rgba(238, 246, 255, 0.85);
    }

    .calculator-mobile-bar__price strong {
        font-size: 1.02rem;
        line-height: 1.1;
        color: #fff;
        white-space: nowrap;
    }

    .calculator-mobile-bar__button {
        appearance: none;
        border: 0;
        border-radius: 999px;
        padding: 14px 16px;
        min-height: 48px;
        font: inherit;
        font-weight: 800;
        color: #fff;
        background: linear-gradient(135deg, var(--cyan), var(--violet));
        box-shadow: 0 12px 26px rgba(0, 169, 244, 0.26);
        white-space: nowrap;
    }

    .calculator-layout {
        row-gap: 18px;
    }

    .calculator-panel--summary {
        margin-top: 42px;
        margin-bottom: 64px;
        position: static;
    }

    .calculator-panel--request {
        margin-top: 0;
    }

    .form-block--contact {
        margin-top: 56px;
    }

    .calculator-panel--form .block-head p {
        margin-bottom: 6px;
    }
}
