/* =========================================================
   CONTACT FORM
========================================================= */

.contact-form {
    width: 100%;
}

.contact-form__header {
    margin-bottom: 24px;
}

.contact-form__header h2 {
    margin: 0 0 6px;

    color: #fff;

    font-size: 28px;
    font-weight: 700;
}

.contact-form__header p {
    margin: 0;

    color: #93a4b3;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   ROW
========================================================= */

.contact-form__row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 18px;
}

.contact-form__field {
    margin-bottom: 18px;
}

.contact-form__field label,
.contact-form__services legend {
    display: block;

    margin-bottom: 8px;

    color: #fff;

    font-size: 13px;
    font-weight: 500;
}

.contact-form__field label span,
.contact-form__services legend span {
    color: #078ef0;
}


/* =========================================================
   INPUT
========================================================= */

.contact-form__input {
    position: relative;
}

.contact-form__input-icon {
    position: absolute;

    top: 50%;
    left: 16px;

    transform: translateY(-50%);

    color: #6d8ca5;

    font-size: 18px;

    pointer-events: none;
}

.contact-form__input input {
    width: 100%;
    height: 48px;

    padding: 0 16px 0 48px;

    border: 1px solid rgba(80, 160, 220, .35);
    border-radius: 7px;

    outline: none;

    background: rgba(5, 28, 46, .65);

    color: #fff;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.contact-form__input input::placeholder {
    color: #70889b;
}

.contact-form__input input:focus {
    border-color: #078ef0;

    background: rgba(5, 34, 56, .85);

    box-shadow:
        0 0 0 3px rgba(7, 142, 240, .08);
}


/* =========================================================
   SERVICES
========================================================= */

.contact-form__services {
    margin: 0 0 18px;
    padding: 0;

    border: 0;
}

.contact-form__services-grid {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 8px;
}

.contact-service {
    cursor: pointer;
}

.contact-service input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.contact-service__box {
    position: relative;

    min-height: 86px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 12px 8px;

    border: 1px solid rgba(80, 160, 220, .32);
    border-radius: 7px;

    background: rgba(5, 24, 40, .65);

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.contact-service:hover .contact-service__box {
    border-color: rgba(7, 142, 240, .7);

    transform: translateY(-2px);
}

.contact-service input:checked + .contact-service__box {
    border-color: #078ef0;

    background:
        linear-gradient(
            180deg,
            rgba(7, 142, 240, .20),
            rgba(5, 24, 40, .75)
        );

    box-shadow:
        inset 0 0 20px rgba(7, 142, 240, .08),
        0 0 18px rgba(7, 142, 240, .08);
}

.contact-service__icon {
    color: #078ef0;

    font-size: 25px;
    line-height: 1;
}

.contact-service__name {
    color: #fff;

    font-size: 12px;
    font-weight: 500;

    text-align: center;
}


/* =========================================================
   TEXTAREA
========================================================= */

.contact-form__textarea {
    position: relative;
}

.contact-form__textarea textarea {
    display: block;

    width: 100%;
    height: 105px;

    padding: 14px 16px 30px;

    resize: vertical;

    border: 1px solid rgba(80, 160, 220, .35);
    border-radius: 7px;

    outline: none;

    background: rgba(5, 28, 46, .65);

    color: #fff;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.contact-form__textarea textarea::placeholder {
    color: #70889b;
}

.contact-form__textarea textarea:focus {
    border-color: #078ef0;

    box-shadow:
        0 0 0 3px rgba(7, 142, 240, .08);
}

.contact-form__counter {
    position: absolute;

    right: 12px;
    bottom: 9px;

    color: #668298;

    font-size: 11px;
}


/* =========================================================
   BOTTOM
========================================================= */

.contact-form__bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.contact-form__privacy {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #b8c3cc;

    font-size: 12px;
}

.contact-form__privacy input {
    accent-color: #078ef0;
}

.contact-form__privacy a {
    color: #078ef0;

    text-decoration: underline;
}


/* =========================================================
   SUBMIT
========================================================= */

.contact-form__submit {
    min-width: 220px;
    height: 52px;

    padding: 0 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 18px;

    border: 0;
    border-radius: 7px;

    cursor: pointer;

    background:
        linear-gradient(
            90deg,
            #0878e9,
            #079cff
        );

    color: #fff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    box-shadow:
        0 0 20px rgba(7, 142, 240, .18);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.contact-form__submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 0 28px rgba(7, 142, 240, .32);
}

.contact-form__submit-arrow {
    font-size: 19px;
}


/* =========================================================
   POPUP
========================================================= */

.contact-popup {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    visibility: hidden;
    opacity: 0;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.contact-popup.is-open {
    visibility: visible;
    opacity: 1;
}

.contact-popup__overlay {
    position: absolute;

    inset: 0;

    background: rgba(0, 5, 10, .82);

    backdrop-filter: blur(7px);
}

.contact-popup__dialog {
    position: relative;
    z-index: 2;

    width: min(900px, 100%);

    max-height: calc(100vh - 60px);

    overflow-y: auto;

    padding: 38px;

    border: 1px solid rgba(40, 160, 235, .42);
    border-radius: 12px;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(0, 126, 255, .14),
            transparent 38%
        ),
        #020d16;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, .55),
        0 0 45px rgba(0, 125, 255, .08);

    transform: translateY(20px) scale(.985);

    transition: transform .25s ease;
}

.contact-popup.is-open .contact-popup__dialog {
    transform: translateY(0) scale(1);
}

.contact-popup__close {
    position: absolute;

    top: 14px;
    right: 17px;

    width: 36px;
    height: 36px;

    border: 1px solid rgba(40, 160, 235, .35);
    border-radius: 50%;

    cursor: pointer;

    background: rgba(4, 25, 42, .8);

    color: #fff;

    font-size: 23px;
    line-height: 1;
}

.contact-popup__heading {
    margin-bottom: 25px;
}

.contact-popup__heading > span {
    display: block;

    margin-bottom: 7px;

    color: #078ef0;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .12em;
}

.contact-popup__heading h2 {
    margin: 0;

    color: #fff;

    font-size: 29px;
    line-height: 1.05;

    text-transform: uppercase;
}

.contact-popup__heading h2 strong {
    color: #078ef0;
}

.contact-popup-open {
    overflow: hidden;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 800px) {

    .contact-form__services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-popup {
        padding: 15px;
    }

    .contact-popup__dialog {
        padding: 30px 20px;
    }

}


@media (max-width: 600px) {

    .contact-form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form__bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-form__submit {
        width: 100%;
    }

}

/* =========================================================
   CONTACT FORM - FINAL STYLES
========================================================= */

.contact-form__form {
    width: 100%;
}

.contact-form__heading {
    margin-bottom: 26px;
}

.contact-form__heading h3 {
    margin: 0 0 6px;

    color: #fff;

    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.contact-form__heading p {
    margin: 0;

    color: #8496a5;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   ROW
========================================================= */

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 16px;

    margin-bottom: 18px;
}


/* =========================================================
   FIELD
========================================================= */

.contact-form__field {
    position: relative;

    margin-bottom: 18px;
}

.contact-form__row .contact-form__field {
    margin-bottom: 0;
}

.contact-form__field label,
.contact-form__services legend {
    display: block;

    margin: 0 0 8px;

    color: #fff;

    font-size: 13px;
    font-weight: 600;
}

.contact-form__field label span,
.contact-form__services legend span {
    color: #079cff;
}


/* =========================================================
   INPUT WRAPPER
========================================================= */

.contact-form__input-wrap {
    position: relative;
}

.contact-form__input-icon {
    position: absolute;

    top: 50%;
    left: 17px;

    transform: translateY(-50%);

    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 18px;

    color: #668399;

    font-size: 16px;

    pointer-events: none;
}


/* =========================================================
   INPUT
========================================================= */

.contact-form__input-wrap input {
    display: block;

    width: 100%;
    height: 50px;

    box-sizing: border-box;

    padding: 0 16px 0 48px;

    border: 1px solid #214d69;
    border-radius: 8px;

    outline: none;

    background: #061d2c;

    color: #fff;

    font: inherit;
    font-size: 14px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.contact-form__input-wrap input::placeholder {
    color: #637888;

    opacity: 1;
}

.contact-form__input-wrap input:hover {
    border-color: #2a6588;
}

.contact-form__input-wrap input:focus {
    border-color: #079cff;

    background: #072131;

    box-shadow:
        0 0 0 2px rgba(7, 156, 255, .08),
        0 0 18px rgba(7, 156, 255, .08);
}


/* =========================================================
   SERVICES
========================================================= */

.contact-form__services {
    min-width: 0;

    margin: 0 0 18px;
    padding: 0;

    border: 0;
}

.contact-form__services-grid {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 8px;
}

.contact-form__service {
    position: relative;

    display: block;

    margin: 0;

    cursor: pointer;
}

.contact-form__service > input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}

.contact-form__service-box {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 84px;

    box-sizing: border-box;

    padding: 12px 8px;

    border: 1px solid #214d69;
    border-radius: 7px;

    background: #061d2c;

    color: #fff;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.contact-form__service:hover .contact-form__service-box {
    border-color: #078ef0;

    background: #072335;

    transform: translateY(-1px);
}

.contact-form__service-icon {
    display: flex;

    min-height: 22px;

    align-items: center;
    justify-content: center;

    color: #079cff;

    font-size: 20px;
    font-weight: 500;
    line-height: 1;
}

.contact-form__service-name {
    color: #fff;

    font-size: 12px;
    font-weight: 600;

    text-align: center;
}


/* SELECTED SERVICE */

.contact-form__service > input:checked + .contact-form__service-box {
    border-color: #079cff;

    background:
        linear-gradient(
            180deg,
            rgba(7, 156, 255, .15),
            rgba(7, 156, 255, .04)
        );

    box-shadow:
        0 0 0 1px rgba(7, 156, 255, .15),
        0 0 20px rgba(7, 156, 255, .10);
}

.contact-form__service > input:checked + .contact-form__service-box::after {
    content: "✓";

    position: absolute;

    top: 6px;
    right: 7px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;

    border-radius: 50%;

    background: #079cff;

    color: #fff;

    font-size: 10px;
    font-weight: 700;
}


/* =========================================================
   TEXTAREA
========================================================= */

.contact-form__textarea-wrap {
    position: relative;
}

.contact-form__textarea-wrap textarea {
    display: block;

    width: 100%;
    min-height: 105px;

    box-sizing: border-box;

    padding: 15px 16px 30px;

    resize: vertical;

    border: 1px solid #214d69;
    border-radius: 8px;

    outline: none;

    background: #061d2c;

    color: #fff;

    font: inherit;
    font-size: 14px;
    line-height: 1.5;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.contact-form__textarea-wrap textarea::placeholder {
    color: #637888;

    opacity: 1;
}

.contact-form__textarea-wrap textarea:focus {
    border-color: #079cff;

    background: #072131;

    box-shadow:
        0 0 0 2px rgba(7, 156, 255, .08),
        0 0 18px rgba(7, 156, 255, .08);
}

.contact-form__counter {
    position: absolute;

    right: 12px;
    bottom: 8px;

    color: #60798c;

    font-size: 11px;

    pointer-events: none;
}


/* =========================================================
   BOTTOM
========================================================= */

.contact-form__bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 4px;
}


/* =========================================================
   CUSTOM CHECKBOX
========================================================= */

.contact-form__privacy {
    position: relative;

    display: flex;
    align-items: center;

    gap: 9px;

    margin: 0;

    color: #8fa0ad;

    font-size: 12px;

    cursor: pointer;
}

.contact-form__privacy > input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}

.contact-form__checkbox {
    position: relative;

    flex: 0 0 17px;

    width: 17px;
    height: 17px;

    box-sizing: border-box;

    border: 1px solid #416277;
    border-radius: 3px;

    background: #061d2c;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.contact-form__privacy > input:checked + .contact-form__checkbox {
    border-color: #079cff;

    background: #079cff;

    box-shadow: 0 0 12px rgba(7, 156, 255, .25);
}

.contact-form__privacy > input:checked + .contact-form__checkbox::after {
    content: "";

    position: absolute;

    left: 5px;
    top: 2px;

    width: 4px;
    height: 8px;

    border: solid #fff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}

.contact-form__privacy a {
    color: #079cff;

    text-decoration: underline;
    text-underline-offset: 2px;
}


/* =========================================================
   SUBMIT
========================================================= */

.contact-form__submit {
    flex: 0 0 auto;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 35px;

    min-width: 220px;
    height: 52px;

    padding: 0 22px;

    border: 0;
    border-radius: 8px;

    background:
        linear-gradient(
            90deg,
            #087de9,
            #079cff
        );

    box-shadow:
        0 0 18px rgba(7, 156, 255, .16);

    color: #fff;

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.contact-form__submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 7px 25px rgba(7, 156, 255, .27);
}

.contact-form__submit:disabled {
    opacity: .65;

    cursor: wait;

    transform: none;
}

.contact-form__submit-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;
}

.contact-form__submit-arrow svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform .2s ease;
}

.contact-form__submit:hover .contact-form__submit-arrow svg {
    transform: translate(2px, -2px);
}


/* =========================================================
   VALIDATION
========================================================= */

.contact-form__error {
    display: block;

    min-height: 0;

    margin-top: 5px;

    color: #ff6876;

    font-size: 11px;
}

.contact-form__field.has-error input,
.contact-form__field.has-error textarea {
    border-color: #ff5364;
}

.contact-form__services.has-error .contact-form__service-box {
    border-color: rgba(255, 83, 100, .65);
}

.contact-form__privacy.has-error .contact-form__checkbox {
    border-color: #ff5364;
}


/* =========================================================
   STATUS
========================================================= */

.contact-form__status {
    margin-top: 12px;

    font-size: 12px;

    text-align: right;
}

.contact-form__status.is-success {
    color: #4ad295;
}

.contact-form__status.is-error {
    color: #ff6876;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 760px) {

    .contact-form__row {
        grid-template-columns: 1fr;
    }

    .contact-form__services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-form__bottom {
        flex-direction: column;

        align-items: stretch;
    }

    .contact-form__submit {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .contact-form__services-grid {
        grid-template-columns: 1fr;
    }

}

.contact-popup__intro h2 strong {
    color: #078ef0;
}

.contact-form__service-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 30px;

    color: #079cff;
}

.contact-form__service-icon svg {
    width: 30px;
    height: 30px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-form__service:last-child .contact-form__service-icon svg circle {
    fill: currentColor;
    stroke: none;
}