/* =========================================================
 * VISMART CONTACT FORM
 * Scoped styles only
 * ========================================================= */

.vismart-contact-section {
    --vs-contact-red: #c40000;
    --vs-contact-red-dark: #a90000;
    --vs-contact-navy: #172b4d;
    --vs-contact-text: #172b4d;
    --vs-contact-muted: #7b8794;
    --vs-contact-border: #e3e8ef;
    --vs-contact-bg: #f7f9fc;

    width: 100%;
    box-sizing: border-box;
}

.vismart-contact-section *,
.vismart-contact-section *::before,
.vismart-contact-section *::after {
    box-sizing: border-box;
}


.vismart-contact-card {
    position: relative;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 30px;

    border: 1px solid rgba(23, 43, 77, 0.11);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at top right,
            rgba(196, 0, 0, 0.045),
            transparent 32%
        ),
        #fff;

    box-shadow:
        0 12px 35px rgba(23, 43, 77, 0.08);

    overflow: hidden;
}


.vismart-contact-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--vs-contact-navy),
            var(--vs-contact-red)
        );
}


.vismart-contact-header {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-bottom: 28px;
}


.vismart-contact-icon {
    position: relative;

    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            var(--vs-contact-red),
            var(--vs-contact-red-dark)
        );

    box-shadow:
        0 8px 18px rgba(196, 0, 0, 0.18);

    transform: rotate(-3deg);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.vismart-contact-icon:hover {
    transform: rotate(0deg) translateY(-2px);
    box-shadow:
        0 12px 22px rgba(196, 0, 0, 0.22);
}


.vismart-contact-icon span,
.vismart-contact-icon span::before,
.vismart-contact-icon span::after {
    position: absolute;
    display: block;
    content: "";
}


.vismart-contact-icon span {
    width: 24px;
    height: 18px;

    border: 2px solid #fff;
    border-radius: 5px;
}


.vismart-contact-icon span::before {
    right: -5px;
    bottom: -6px;

    width: 9px;
    height: 9px;

    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;

    transform: skewX(-28deg);
}


.vismart-contact-heading {
    min-width: 0;
}


.vismart-contact-eyebrow {
    display: block;

    margin-bottom: 3px;

    color: var(--vs-contact-red);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}


.vismart-contact-heading h2 {
    margin: 0;

    color: var(--vs-contact-text);

    font-size: 25px;
    font-weight: 900;
    line-height: 1.6;
}


.vismart-contact-heading p {
    margin: 5px 0 0;

    color: var(--vs-contact-muted);

    font-size: 13px;
    font-weight: 500;
    line-height: 2;
}


.vismart-contact-form {
    display: block;
}


.vismart-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}


.vismart-contact-field {
    position: relative;
    margin-bottom: 18px;
}


.vismart-contact-field label {
    display: block;

    margin: 0 0 8px;

    color: var(--vs-contact-text);

    font-size: 14px;
    font-weight: 800;
    line-height: 1.7;

    text-align: right;
}


.vismart-contact-field label span {
    color: var(--vs-contact-red);
}


.vismart-contact-field input,
.vismart-contact-field textarea {
    width: 100%;

    border: 1px solid var(--vs-contact-border);
    border-radius: 13px;

    outline: none;

    background: #fff;
    color: var(--vs-contact-text);

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .18s ease,
        background-color .2s ease;
}


.vismart-contact-field input {
    min-height: 52px;
    padding: 13px 15px;

    text-align: right;
}


.vismart-contact-field textarea {
    min-height: 165px;
    padding: 14px 15px;

    resize: vertical;
    text-align: right;
    line-height: 2;
}


.vismart-contact-field input::placeholder,
.vismart-contact-field textarea::placeholder {
    color: #a7b0bc;
}


.vismart-contact-field input:hover,
.vismart-contact-field textarea:hover {
    border-color: #cbd4df;
    background: #fcfdff;
}


.vismart-contact-field input:focus,
.vismart-contact-field textarea:focus {
    border-color: var(--vs-contact-red);

    box-shadow:
        0 0 0 4px rgba(196, 0, 0, 0.075);

    background: #fff;

    transform: translateY(-1px);
}


.vismart-contact-field input:invalid:not(:placeholder-shown),
.vismart-contact-field textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(196, 0, 0, 0.55);
}


.vismart-contact-security {
    margin-top: 4px;
    margin-bottom: 20px;

    padding: 16px;

    border: 1px solid var(--vs-contact-border);
    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #fbfcfe,
            #f7f9fc
        );
}


.vismart-contact-security-title {
    margin-bottom: 10px;

    color: var(--vs-contact-text);

    font-size: 13px;
    font-weight: 800;
}


.vismart-contact-security-content {
    display: flex;
    align-items: center;
    gap: 12px;
}


.vismart-contact-security-question {
    min-height: 48px;

    display: flex;
    align-items: center;
    gap: 8px;

    flex: 1;

    padding: 0 13px;

    border: 1px solid #e4e9ef;
    border-radius: 11px;

    background: #fff;

    color: var(--vs-contact-muted);

    font-size: 12px;
    line-height: 1.8;
}


.vismart-contact-security-question strong {
    color: var(--vs-contact-navy);
    font-size: 15px;
    direction: ltr;
}


.vismart-contact-security-input {
    width: 92px;
    height: 48px;

    flex: 0 0 92px;

    border: 1px solid #dce3eb;
    border-radius: 11px;

    outline: none;

    background: #fff;
    color: var(--vs-contact-text);

    font-family: inherit;
    font-size: 16px;
    font-weight: 800;

    text-align: center;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


.vismart-contact-security-input:focus {
    border-color: var(--vs-contact-red);

    box-shadow:
        0 0 0 4px rgba(196, 0, 0, 0.075);
}


.vismart-contact-hp {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    overflow: hidden !important;

    clip: rect(0 0 0 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


.vismart-contact-status {
    margin: 0 0 16px;
    padding: 12px 15px;

    border-radius: 12px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.9;

    text-align: right;
}


.vismart-contact-status.is-success {
    border: 1px solid rgba(22, 128, 60, .18);
    background: rgba(22, 128, 60, .075);
    color: #176b38;
}


.vismart-contact-status.is-error {
    border: 1px solid rgba(196, 0, 0, .18);
    background: rgba(196, 0, 0, .06);
    color: #a90000;
}


.vismart-contact-submit-row {
    display: flex;
    justify-content: flex-start;
}


.vismart-contact-submit {
    position: relative;

    min-width: 170px;
    min-height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    margin: 0;

    padding: 13px 20px;

    border: 0 !important;
    border-radius: 13px !important;

    background:
        linear-gradient(
            135deg,
            var(--vs-contact-red),
            var(--vs-contact-red-dark)
        ) !important;

    color: #fff !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 900 !important;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(196, 0, 0, 0.20);

    overflow: hidden;

    transition:
        transform .18s ease,
        box-shadow .2s ease,
        filter .2s ease,
        background .2s ease;
}


.vismart-contact-submit::before {
    content: "";

    position: absolute;

    top: 0;
    right: -70%;

    width: 60%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.25),
            transparent
        );

    transform: skewX(-20deg);

    transition:
        right .55s ease;
}


.vismart-contact-submit:hover::before {
    right: 130%;
}


.vismart-contact-submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 24px rgba(196, 0, 0, 0.28);

    filter: brightness(1.03);
}


.vismart-contact-submit:active {
    transform: translateY(2px) scale(.985);

    box-shadow:
        0 4px 9px rgba(196, 0, 0, 0.18);
}


.vismart-contact-submit:focus-visible {
    outline: 3px solid rgba(196, 0, 0, .18);
    outline-offset: 3px;
}


.vismart-contact-submit:disabled {
    opacity: .82;
    cursor: wait;

    transform: none;

    box-shadow:
        0 6px 14px rgba(196, 0, 0, 0.13);
}


.vismart-contact-submit-icon {
    width: 20px;
    height: 20px;

    display: inline-flex;

    transition:
        transform .2s ease;
}


.vismart-contact-submit:hover .vismart-contact-submit-icon {
    transform: translateX(-3px);
}


.vismart-contact-submit-icon svg {
    width: 100%;
    height: 100%;

    fill: currentColor;
}


.vismart-contact-loader {
    display: none;

    width: 18px;
    height: 18px;

    border: 2px solid rgba(255,255,255,.38);
    border-top-color: #fff;

    border-radius: 50%;

    animation:
        vismartContactSpin .7s linear infinite;
}


.vismart-contact-submit.is-loading .vismart-contact-submit-icon {
    display: none;
}


.vismart-contact-submit.is-loading .vismart-contact-loader {
    display: inline-block;
}


.vismart-contact-submit.is-success {
    background:
        linear-gradient(
            135deg,
            #16803c,
            #126a30
        ) !important;

    box-shadow:
        0 8px 18px rgba(22, 128, 60, .20);
}


.vismart-contact-submit.is-success:hover {
    box-shadow:
        0 12px 24px rgba(22, 128, 60, .25);
}


@keyframes vismartContactSpin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 700px) {

    .vismart-contact-card {
        padding: 22px 18px;
        border-radius: 18px;
    }


    .vismart-contact-header {
        align-items: flex-start;
        gap: 13px;
        margin-bottom: 23px;
    }


    .vismart-contact-icon {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        border-radius: 14px;
    }


    .vismart-contact-heading h2 {
        font-size: 21px;
    }


    .vismart-contact-heading p {
        font-size: 12px;
    }


    .vismart-contact-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }


    .vismart-contact-security-content {
        flex-direction: column;
        align-items: stretch;
    }


    .vismart-contact-security-question {
        min-height: 52px;
    }


    .vismart-contact-security-input {
        width: 100%;
        flex-basis: auto;
    }


    .vismart-contact-submit-row {
        justify-content: stretch;
    }


    .vismart-contact-submit {
        width: 100%;
    }

}


@media (prefers-reduced-motion: reduce) {

    .vismart-contact-card,
    .vismart-contact-icon,
    .vismart-contact-field input,
    .vismart-contact-field textarea,
    .vismart-contact-submit,
    .vismart-contact-submit-icon {
        transition: none !important;
    }

    .vismart-contact-loader {
        animation: none !important;
    }

}