/* =========================================================
   CONTACT FORM
========================================================= */

.contact-form-wrapper {
    width: 100%;
}


/* =========================================================
   SUCCESS MESSAGE
========================================================= */

.contact-success {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 35px;
    border: 1px solid var(--border);
    background: var(--white);
}

.contact-success[hidden] {
    display: none;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    border-radius: 50%;

    font-size: 24px;
    font-weight: 700;
}


/* =========================================================
   FORM
========================================================= */

.contact-form[hidden] {
    display: none;
}

.contact-form {
    width: 100%;
}


/* =========================================================
   FORM GRID
========================================================= */

.form-grid.two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


/* =========================================================
   FORM GROUP
========================================================= */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group label > span {
    margin-left: 3px;
}


/* =========================================================
   INPUTS
========================================================= */

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    background: var(--white);
    padding: 13px 15px;
    font: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.contact-form textarea {
    min-height: 170px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   VALIDATION
========================================================= */

.contact-form .is-invalid {
    border-color: #dc3545 !important;
}

.form-error {
    display: block;
    min-height: 18px;
    margin-top: 5px;
    color: #dc3545;
    font-size: 13px;
}


/* =========================================================
   TEXTAREA FOOTER
========================================================= */

.textarea-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

#contactCharacterCount {
    flex-shrink: 0;
    font-size: 13px;
    opacity: 0.7;
}


/* =========================================================
   CONSENT
========================================================= */

.form-consent {
    margin: 10px 0 25px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 3px;

    border: 1px solid var(--border);
    background: var(--white);

    position: relative;
}

.checkbox-label input[type="checkbox"]:checked
+ .custom-checkbox::after {
    content: "✓";

    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    font-size: 13px;
    font-weight: 700;
}

.checkbox-label input[type="checkbox"]:focus
+ .custom-checkbox {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   SUBMIT
========================================================= */

.contact-submit {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-submit p {
    margin: 0;
    font-size: 14px;
}


/* =========================================================
   LOADER
========================================================= */

.submit-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.is-loading .submit-loader {
    display: inline-flex;
}

.is-loading .submit-text {
    display: none;
}

.submit-loader span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: contactLoader 0.8s infinite ease-in-out;
}

.submit-loader span:nth-child(2) {
    animation-delay: 0.15s;
}

.submit-loader span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes contactLoader {

    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .form-grid.two-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-success {
        padding: 25px;
        flex-direction: column;
    }

    .contact-submit {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-submit .btn {
        width: 100%;
    }

}