﻿:root {
    --cyan: #00AEEF;
    --cyan-dark: #0098d4;
    --cyan-light: #d0f0fc;
    --cyan-xlight: #f0f9ff;
    --text-primary: #0d1b2a;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --border: #d1e8f0;
    --border-focus: #00AEEF;
    --bg: #f7fbfd;
    --bg-card: #ffffff;
    --error: #e53e3e;
    --error-light: #fff5f5;
    --success: #38a169;
    --success-light: #f0fff4;
    --shadow-sm: 0 1px 3px rgba(0, 174, 239, .08), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 20px rgba(0, 174, 239, .10), 0 2px 8px rgba(0, 0, 0, .06);
    --shadow-lg: 0 10px 40px rgba(0, 174, 239, .15), 0 4px 16px rgba(0, 0, 0, .08);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: .18s cubic-bezier(.4, 0, .2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
}

/* ─── PAGE HEADER ─── */
.page-header {
    text-align: center;
    margin: 36px;
    animation: fadeDown .5s ease both;
}

    .page-header .logo-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: var(--cyan-xlight);
        border: 1px solid var(--border);
        border-radius: 100px;
        padding: 6px 18px;
        font-size: 12px;
        font-weight: 600;
        color: var(--cyan-dark);
        letter-spacing: .06em;
        text-transform: uppercase;
        margin-bottom: 16px;
    }

        .page-header .logo-badge .dot {
            width: 6px;
            height: 6px;
            background: var(--cyan);
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

    .page-header h1 {
        font-family: 'Montserrat', sans-serif;
        font-size: clamp(28px, 5vw, 42px);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.15;
    }

        .page-header h1 span {
            color: var(--cyan);
        }

    .page-header p {
        margin-top: 10px;
        color: var(--text-secondary);
        font-size: 15px;
        max-width: 460px;
        margin-inline: auto;
    }

/* ─── FORM CARD ─── */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 920px;
    width: 100% !important;
    margin: 0 auto;
    overflow: hidden;
    animation: fadeUp .5s .1s ease both;
    margin-bottom: 5%;
}

/* ─── SECTION ─── */
.form-section {
    padding: 32px 36px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

    .form-section:last-of-type {
        border-bottom: none;
    }

@media(max-width:600px) {
    .form-section {
        padding: 24px 20px;
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-icon {
    width: 34px;
    height: 34px;
    background: var(--cyan-xlight);
    border: 1px solid var(--cyan-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .section-icon svg {
        width: 16px;
        height: 16px;
        stroke: var(--cyan-dark);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.01em;
}

.section-step {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ─── GRID ─── */
.form-grid {
    display: grid;
    gap: 20px;
}

.form-grid--two {
    grid-template-columns: 1fr 1fr;
}

@media(max-width:580px) {
    .form-grid--two {
        grid-template-columns: 1fr;
    }
}

/* ─── FIELD ─── */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field.full-width {
        grid-column: 1 / -1;
    }

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

    label .req {
        color: var(--cyan);
        font-size: 14px;
        line-height: 1;
    }

/* ─── INPUTS ─── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select:not(.js_language_selector) {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

    input::placeholder,
    textarea::placeholder {
        color: var(--text-muted);
        font-size: 13.5px;
    }

    input:focus,
    textarea:focus,
    select:focus {
        border-color: var(--border-focus);
        box-shadow: 0 0 0 3px rgba(0, 174, 239, .12);
        background: var(--cyan-xlight);
    }

input.valid {
    border-color: var(--success);
}

input.invalid,
select.invalid,
textarea.invalid {
    border-color: var(--error);
    background: var(--error-light);
}

    input.invalid:focus,
    select.invalid:focus,
    textarea.invalid:focus {
        box-shadow: 0 0 0 3px rgba(229, 62, 62, .10);
        background: var(--error-light);
    }

textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.6;
}

/* ─── SELECT WRAPPER ─── */
.select-wrapper {
    position: relative;
}

    .select-wrapper svg.chevron {
        position: absolute;
        right: 13px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        stroke: var(--text-muted);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        pointer-events: none;
        transition: stroke var(--transition);
    }

    .select-wrapper:focus-within svg.chevron {
        stroke: var(--cyan);
    }

    .select-wrapper select {
        padding-right: 38px;
        cursor: pointer;
    }

select:disabled {
    background: #f5f9fc;
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: #e2edf2;
}

/* ─── ERROR MSG ─── */
.field-error {
    display: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--error);
    align-items: center;
    gap: 4px;
    animation: fadeIn .15s ease;
}

    .field-error.show {
        display: flex;
    }

    .field-error svg {
        width: 12px;
        height: 12px;
        fill: var(--error);
        flex-shrink: 0;
    }

/* ─── RADIO GROUP ─── */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex-wrap: nowrap;
}

.radio-label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    user-select: none;
}

    .radio-label:hover {
        border-color: var(--cyan);
        color: var(--cyan-dark);
        background: var(--cyan-xlight);
    }

    .radio-label input[type="radio"] {
        display: none;
    }

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

    .radio-custom::after {
        content: '';
        width: 7px;
        height: 7px;
        background: var(--cyan);
        border-radius: 50%;
        opacity: 0;
        transform: scale(0);
        transition: all var(--transition);
    }

.radio-label input:checked ~ .radio-custom {
    border-color: var(--cyan);
    background: var(--cyan-xlight);
}

    .radio-label input:checked ~ .radio-custom::after {
        opacity: 1;
        transform: scale(1);
    }

.radio-label:has(input:checked) {
    border-color: var(--cyan);
    background: var(--cyan-xlight);
    color: var(--cyan-dark);
}

.radio-group.invalid .radio-label {
    border-color: var(--error);
    background: var(--error-light);
}

/* ─── CHECKBOX GROUP ─── */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    user-select: none;
}

    .checkbox-label:hover {
        border-color: var(--cyan);
        color: var(--cyan-dark);
        background: var(--cyan-xlight);
    }

    .checkbox-label input[type="checkbox"] {
        display: none;
    }

.checkbox-custom {
    width: 17px;
    height: 17px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

    .checkbox-custom svg {
        width: 10px;
        height: 10px;
        stroke: white;
        fill: none;
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
        opacity: 0;
        transform: scale(0);
        transition: all var(--transition);
    }

.checkbox-label input:checked ~ .checkbox-custom {
    background: var(--cyan);
    border-color: var(--cyan);
}

    .checkbox-label input:checked ~ .checkbox-custom svg {
        opacity: 1;
        transform: scale(1);
    }

.checkbox-label:has(input:checked) {
    border-color: var(--cyan);
    background: var(--cyan-xlight);
    color: var(--cyan-dark);
}

.checkbox-group.invalid .checkbox-label {
    border-color: var(--error);
}

/* ─── INPUT HINT ─── */
.field-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: -2px;
}

/* ─── SUBMIT ─── */
.form-footer {
    padding: 28px 36px;
    background: linear-gradient(135deg, var(--cyan-xlight) 0%, #fff 100%);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

@media(max-width:600px) {
    .form-footer {
        padding: 20px;
    }
}

.form-footer .disclaimer {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 360px;
    line-height: 1.5;
}

    .form-footer .disclaimer a {
        color: var(--cyan-dark);
        text-decoration: underline;
    }

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--cyan);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(0, 174, 239, .35);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

    .btn-submit::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, .2) 0%, transparent 60%);
        pointer-events: none;
    }

    .btn-submit:hover {
        background: var(--cyan-dark);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 174, 239, .45);
    }

    .btn-submit:active {
        transform: translateY(0);
        box-shadow: 0 3px 10px rgba(0, 174, 239, .25);
    }

    .btn-submit:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
    }

    .btn-submit svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: white;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform var(--transition);
    }

    .btn-submit:hover svg {
        transform: translateX(3px);
    }

    .btn-submit .spinner {
        display: none;
        width: 18px;
        height: 18px;
        border: 2.5px solid rgba(255, 255, 255, .3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin .7s linear infinite;
    }

    .btn-submit.loading .spinner {
        display: block;
    }

    .btn-submit.loading .btn-icon {
        display: none;
    }

    .btn-submit.loading .btn-text::after {
        content: '...';
    }

/* ─── SUCCESS STATE ─── */
.success-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    gap: 16px;
}

    .success-overlay.show {
        display: flex;
    }

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success-light);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn .4s cubic-bezier(.34, 1.56, .64, 1) both;
}

    .success-icon svg {
        width: 28px;
        height: 28px;
        stroke: var(--success);
        fill: none;
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.success-overlay h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 800;
}

.success-overlay p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 360px;
}

/* ─── PROGRESS BAR ─── */
.progress-bar-wrap {
    height: 3px;
    background: var(--border);
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan-dark) 100%);
    border-radius: 0 3px 3px 0;
    transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-14px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes pulse {

    0%, 100% {
        opacity: 1
    }

    50% {
        opacity: .4
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(.6)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

/* ─── PHONE FORMAT HINT ─── */
.phone-wrapper {
    position: relative;
}

    .phone-wrapper input {
        padding-left: 44px;
    }

.phone-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    pointer-events: none;
}

/* ─── TOOLTIP ─── */
.tooltip-wrap {
    position: relative;
    display: inline-flex;
}

    .tooltip-wrap .tip {
        position: absolute;
        bottom: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        background: var(--text-primary);
        color: white;
        font-size: 11px;
        padding: 5px 10px;
        border-radius: 6px;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity .15s;
        z-index: 10;
    }

    .tooltip-wrap:hover .tip {
        opacity: 1;
    }

/* ─── CHAR COUNTER ─── */
.char-counter {
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -4px;
}

    .char-counter.warn {
        color: var(--error);
    }
