.form-block {

    font-family: var(--eyect-font, inherit);
    font-size: var(--eyect-font-size, inherit);
    line-height: var(--eyect-line-height, inherit);
    background: var(--eyect-surface, #fff);
    border-radius: var(--eyect-radius-lg, 16px);
    padding: 28px 30px 30px;
    margin: 0 0 26px;
    box-shadow: var(--eyect-shadow, 0 3px 14px color-mix(in srgb, var(--eyect-brand, #0C4668) 8%, transparent));
    max-width: 720px;
}

.form-intro {
    font-size: 15px;
    line-height: 1.7;
    color: var(--eyect-muted, #555);
    margin-bottom: 20px;
}

.form-field {
    margin-bottom: 18px;
}
.form-field > label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--eyect-brand, #0C4668);
    margin-bottom: 6px;
}
.form-required {
    color: var(--eyect-accent-strong, #0a3853);
}
.form-help {
    display: block;
    font-size: var(--eyect-font-size-sm, 12.5px);
    color: var(--eyect-muted, #7d8b96);
    margin-top: 5px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="file"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: var(--eyect-border-width, 1.5px) solid var(--eyect-field-border, #dfe3ec);
    border-radius: var(--eyect-field-radius, 10px);
    font-size: 15px;
    font-family: var(--eyect-font, inherit);
    color: var(--eyect-field-text, #26333d);
    background: var(--eyect-field-bg, #fff);
    outline: none;
    box-sizing: border-box;
    transition: border-color .18s, box-shadow .18s;
}

.form-field select:not([multiple]):not([size]) {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;

    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='%237d8b96' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 17px;
    cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--eyect-field-focus, #0C4668);
    box-shadow: 0 0 0 3px var(--eyect-field-focus-ring, rgba(253, 119, 42, .14));
}
.form-field textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}
.form-field input[type="file"] {
    padding: 10px 12px;
    background: var(--eyect-surface-soft, #fbfcfe);
    cursor: pointer;
}

.form-field input[type="file"]::file-selector-button,
.form-field input[type="file"]::-webkit-file-upload-button {
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    color: var(--eyect-brand, #0C4668);
    background: var(--eyect-surface, #fff);
    border: 1.5px solid var(--eyect-line, #dfe3ec);
    border-radius: var(--eyect-radius-sm, 8px);
    padding: 8px 16px;
    margin-right: 14px;
    cursor: pointer;
    transition: border-color .18s, background .18s, color .18s;
}
.form-field input[type="file"]:hover::file-selector-button {
    border-color: var(--eyect-accent, #0C4668);
    color: var(--eyect-accent-strong, #0a3853);
    background: var(--eyect-accent-tint, #f3f6f7);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--eyect-ink, #26333d);
    cursor: pointer;
    margin-bottom: 8px;
}
.form-check input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--eyect-accent, #0C4668);
    flex-shrink: 0;
}
.form-radios {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    margin-top: 24px;
}
.form-submit {
    background: linear-gradient(135deg, var(--eyect-gradient-from, #0a3853) 0%, var(--eyect-gradient-to, #2f7fbf) 100%);
    color: var(--eyect-button-cta-text, #fff);
    border: none;
    border-radius: var(--eyect-button-radius, 10px);
    padding: 14px 34px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--eyect-accent-strong, #0a3853) 25%, transparent);
    transition: transform .18s, box-shadow .18s, opacity .18s;
}
.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--eyect-accent-strong, #0a3853) 32%, transparent);
}
.form-submit:active {
    transform: translateY(0);
}

.form-success {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--eyect-ok-soft, #eaf7ec);
    border: 1px solid var(--eyect-ok-line, #b8e0c0);
    border-radius: var(--eyect-radius, 12px);
    padding: 20px 22px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--eyect-ok, #23623a);
}
.form-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--eyect-ok, #2f7d3d);
    color: var(--eyect-brand-contrast, #fff);
    font-weight: 700;
}
.form-errors {
    background: var(--eyect-error-soft, #fdecea);
    border: 1px solid var(--eyect-error-line, #f3c0ba);
    border-radius: var(--eyect-radius, 12px);
    padding: 14px 18px;
    margin-bottom: 20px;
    color: var(--eyect-error, #8a1c2b);
    font-size: 14.5px;
}
.form-errors ul {
    margin: 8px 0 0;
    padding-left: 20px;
}
.form-errors li {
    margin-bottom: 4px;
}

.form-block--notice {
    background: var(--eyect-warn-soft, #fff6e5);
    border: 1px dashed var(--eyect-warn-line, #e8c98a);
    color: var(--eyect-warn, #8a5a12);
    font-size: 14px;
    box-shadow: none;
    padding: 16px 20px;
}

@media (max-width: 700px) {
    .form-block {
        padding: 20px 18px 24px;
        border-radius: var(--eyect-radius, 12px);
    }
    .form-submit {
        width: 100%;
        padding: 15px 20px;
    }
}

.form-section {
    margin: 26px 0 6px;
    padding-top: 16px;
    border-top: 1px solid var(--eyect-line, #dfe3ec);
}

.form-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.form-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.form-section-note {
    margin: 4px 0 0;
    font-size: .85rem;
    opacity: .75;
}

.form-checkgroup {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-checkgroup .form-check {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 7px 10px;
    border: 1px solid var(--eyect-line, #dfe3ec);
    border-radius: var(--eyect-radius-sm, 7px);
    cursor: pointer;
    line-height: 1.45;
}

.form-checkgroup .form-check:hover { background: var(--eyect-accent-tint, #f3f6f7); }
.form-checkgroup .form-check input { margin-top: 3px; flex-shrink: 0; }

.form-field--costsummary {
    position: sticky;
    bottom: 0;
    margin-top: 22px;
    padding: 14px 16px;
    background: var(--eyect-surface-soft, #f4f7fa);
    border: 1px solid var(--eyect-line, #dfe3ec);
    border-radius: var(--eyect-radius-sm, 9px);
}

.form-cost-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .6;
    margin-bottom: 4px;
}

.form-cost-lines { font-size: .85rem; opacity: .8; line-height: 1.5; }

.form-cost-total {
    margin-top: 3px;
    font-size: var(--eyect-font-size-lg, 1.15rem);
    font-weight: 700;
}

.form-cost-note {
    margin-top: 6px;
    font-size: .8rem;
    opacity: .7;
    font-style: italic;
}

.form-choice-price {
    margin-left: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.form-field--checkboxgroup { margin-top: 24px; }

.form-grouplabel {
    display: block;
    margin-bottom: 8px;
    padding-top: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    border-top: 1px solid var(--eyect-line, #dfe3ec);
}

.form-payment-result h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    color: var(--eyect-brand, #0C4668);
}

.form-payment-result p { line-height: 1.65; }

.form-payment-result .form-success h2 { margin-top: 0; color: inherit; }

.form-payment-result--failed { border-left: 4px solid var(--eyect-error, #8a1c2b); }
.form-payment-result--open   { border-left: 4px solid var(--eyect-warn, #8a5a12); }

.form-submit--link {
    display: inline-block;
    text-decoration: none;
    margin-top: 6px;
}

.form-modal[hidden] { display: none; }
.form-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.form-modal-backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--eyect-ink-strong, #111418) 55%, transparent);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.form-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    outline: none;
    animation: form-modal-in .22s ease-out;
}

.form-modal-body {
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    border-radius: var(--eyect-radius-lg, 16px);
    box-shadow: var(--eyect-shadow-lg, 0 12px 40px color-mix(in srgb, var(--eyect-brand, #0C4668) 22%, transparent));
}
.form-modal-body .form-block {
    margin: 0;
    max-width: none;
    box-shadow: none;
}

.form-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 1;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--eyect-surface, #fff);
    color: var(--eyect-ink-soft, #55606b);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--eyect-ink-strong, #111418) 22%, transparent);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s, transform .15s;
}
.form-modal-close:hover {
    background: var(--eyect-accent-pale, #e4edf3);
    color: var(--eyect-brand, #0C4668);
    transform: scale(1.06);
}
.form-modal-close:focus-visible {
    outline: 2px solid var(--eyect-field-focus, #0C4668);
    outline-offset: 2px;
}

.form-modal-done {
    background: var(--eyect-surface, #fff);
    padding: 0 30px 28px;
    margin-top: -22px;
}

body.form-modal-open { overflow: hidden; }

@keyframes form-modal-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .form-modal-dialog { animation: none; }
}
@media (max-width: 600px) {
    .form-modal { padding: 14px; }
    .form-modal-body { max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); }
    .form-modal-close { top: -10px; right: -6px; }
}
