:root {
    --contact-red: #e11229;
    --contact-red-dark: #b50d20;
    --contact-ink: #171717;
    --contact-muted: #676767;
}

html.contact-lock,
html.contact-lock body {
    overflow: hidden;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-modal.is-open {
    display: flex;
}

.contact-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, .72);
    backdrop-filter: blur(5px);
}

.contact-modal__card {
    position: relative;
    z-index: 1;
    width: min(100%, 590px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 34px;
    border-top: 7px solid var(--contact-red);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
    color: var(--contact-ink);
    font-family: Arial, Helvetica, sans-serif;
}

.contact-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #f2f2f2;
    cursor: pointer;
}

.contact-modal__close span::before,
.contact-modal__close span::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 11px;
    width: 20px;
    height: 2px;
    background: #222;
}

.contact-modal__close span::before { transform: rotate(45deg); }
.contact-modal__close span::after { transform: rotate(-45deg); }

.contact-modal__close:hover,
.contact-modal__close:focus-visible {
    background: #e3e3e3;
    outline: 2px solid var(--contact-red);
    outline-offset: 2px;
}

.contact-modal__header {
    padding: 0 38px 22px 0;
}

.contact-modal__eyebrow {
    margin: 0 0 8px;
    color: var(--contact-red);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.contact-modal__header h2 {
    margin: 0 0 10px;
    color: var(--contact-ink);
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 900;
    line-height: 1.05;
}

.contact-modal__header > p:last-child {
    margin: 0;
    color: var(--contact-muted);
    font-size: 16px;
    line-height: 1.45;
}

.contact-form,
.contact-form__field {
    display: block;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.contact-form__field {
    margin-bottom: 15px;
    color: #333;
    font-size: 13px;
    font-weight: 700;
}

.contact-form__field > span {
    display: block;
    margin-bottom: 6px;
}

.contact-form__field input {
    width: 100%;
    min-height: 50px;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #c9c9c9;
    border-radius: 3px;
    background: #fff;
    color: #171717;
    font: 400 16px/1.2 Arial, Helvetica, sans-serif;
}

.contact-form__field input:focus {
    border-color: var(--contact-red);
    box-shadow: 0 0 0 3px rgba(225, 18, 41, .13);
    outline: 0;
}

.contact-form__field.has-error input {
    border-color: #c90018;
}

.contact-form__field.has-error::after {
    content: attr(data-error);
    display: block;
    margin-top: 5px;
    color: #c90018;
    font-size: 12px;
    font-weight: 600;
}

.contact-form .iti {
    display: block;
    width: 100%;
}

.contact-form .iti__country-list {
    z-index: 20;
    width: min(420px, calc(100vw - 62px));
    max-width: none;
    font-size: 14px;
    font-weight: 400;
}

.contact-form .iti__selected-dial-code {
    color: #222;
    font-weight: 600;
}

.contact-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0;
    color: #3f3f3f;
    font: 400 13px/1.4 Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.contact-form__consent input {
    width: 19px;
    height: 19px;
    min-width: 19px;
    margin: 0;
    accent-color: var(--contact-red);
}

.contact-form__message {
    display: none;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 3px;
    background: #fff0f2;
    color: #a5091a;
    font-size: 14px;
    line-height: 1.4;
}

.contact-form__message.is-visible {
    display: block;
}

.contact-form__message.is-success {
    border-color: #badbcc;
    background: #ecf8f0;
    color: #146c43;
}

.contact-form__submit {
    width: 100%;
    margin-top: 14px;
    padding: 17px 22px;
    border: 0;
    border-radius: 3px;
    background: var(--contact-red);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.contact-form__submit:hover {
    background: var(--contact-red-dark);
    transform: translateY(-1px);
}

.contact-form__submit:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.contact-loading {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 10, 10, .92);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
}

.contact-loading.is-active { display: flex; }

.contact-loading__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
}

.contact-loading__spinner {
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    border: 4px solid rgba(225, 18, 41, .25);
    border-top-color: var(--contact-red);
    border-radius: 50%;
    animation: contact-spin .8s linear infinite;
}

.contact-loading__check {
    display: none;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #198754;
    font-size: 38px;
    line-height: 64px;
}

.contact-loading.is-success .contact-loading__spinner { display: none; }
.contact-loading.is-success .contact-loading__check { display: block; }

.contact-loading strong {
    margin-bottom: 8px;
    font-size: 21px;
}

.contact-loading span {
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 1.5;
}

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

@media (max-width: 600px) {
    .contact-modal { padding: 10px; }
    .contact-modal__card {
        max-height: calc(100vh - 20px);
        padding: 26px 20px 22px;
    }
    .contact-modal__header { padding-right: 25px; }
    .contact-form__row { grid-template-columns: 1fr; gap: 0; }
    .contact-form__submit { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .contact-loading__spinner { animation-duration: 1.8s; }
    .contact-form__submit { transition: none; }
}
