/* Contact section block overrides.
   Base visual styles are already defined in /assets/css/theme.css (ai-contact-* classes). */

.ai-contact-section--compact .ai-contact-wrapper {
    max-width: 680px;
}

.ai-contact-form--cf7,
.ai-chat-form--cf7 {
    display: block;
}

.ai-chat-form--cf7 .wpcf7 {
    width: 100%;
}

.ai-chat-form--cf7 .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.ai-chat-form--cf7 .wpcf7-form p {
    margin: 0;
}

.ai-chat-form--cf7 input[type="text"],
.ai-chat-form--cf7 input[type="email"],
.ai-chat-form--cf7 input[type="tel"],
.ai-chat-form--cf7 textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    padding: 14px 19px;
    font-size: var(--text-base-size);
    color: var(--white);
    outline: none;
    transition: var(--transition-all);
}

.ai-chat-form--cf7 textarea {
    min-height: 120px;
    resize: vertical;
}

.ai-chat-form--cf7 input::placeholder,
.ai-chat-form--cf7 textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.ai-chat-form--cf7 input:focus,
.ai-chat-form--cf7 textarea:focus {
    box-shadow: 0 0 15px rgba(246, 193, 46, 0.3);
    border-color: #f6c12e;
}

.ai-chat-form--cf7 .wpcf7-submit {
    background-color: var(--color-primary);
    color: var(--color-blue-dark);
    font-weight: var(--font-black);
    padding: 13px 32px;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(246, 193, 46, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: normal;
    font-size: var(--text-xxs-size);
    border: none;
    cursor: pointer;
}

.ai-chat-form--cf7 .wpcf7-submit:hover {
    background-color: var(--yellow-400);
    transform: translateY(-2px);
}

.ai-chat-form--cf7 .wpcf7-not-valid-tip,
.ai-chat-form--cf7 .wpcf7-response-output {
    font-size: 12px;
}

.ai-chat-form--cf7 .wpcf7-not-valid-tip {
    color: #fecaca;
}

.ai-chat-form--cf7 .wpcf7-response-output {
    margin: 0;
    border-radius: 10px;
}
/* === CF7 premium UX states === */
.ai-chat-form--cf7 .wpcf7-form-control-wrap {
    display: block;
}

.ai-chat-form--cf7 .wpcf7-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 19px;
}

@media (min-width: 768px) {
    .ai-chat-form--cf7 .wpcf7-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ai-chat-form--cf7 .wpcf7-list-item {
    margin: 0;
}

.ai-chat-form--cf7 .wpcf7-form-control.wpcf7-acceptance {
    display: block;
    margin-top: 4px;
}

.ai-chat-form--cf7 .wpcf7-form-control.wpcf7-acceptance .wpcf7-list-item > label {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
}

.ai-chat-form--cf7 .wpcf7-form-control.wpcf7-acceptance input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    flex-shrink: 0;
    transition: all 180ms ease;
}

.ai-chat-form--cf7 .wpcf7-form-control.wpcf7-acceptance input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(246, 193, 46, 0.2);
}

.ai-chat-form--cf7 .wpcf7-form-control.wpcf7-acceptance input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #01231d;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ai-chat-form--cf7 .wpcf7-not-valid {
    border-color: #fb7185 !important;
    box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.14);
}

.ai-chat-form--cf7 .wpcf7-not-valid-tip {
    margin-top: 8px;
    color: #fecdd3;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: normal;
}

.ai-chat-form--cf7 .wpcf7-spinner {
    margin: 0 0 0 8px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--color-primary);
    background: transparent;
}

.ai-chat-form--cf7 .wpcf7-submit[disabled],
.ai-chat-form--cf7 button[type="submit"][disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    filter: grayscale(0.15);
}

.ai-chat-form--cf7 .wpcf7-response-output {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
}

.ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.45);
    color: #dcfce7;
}

.ai-chat-form--cf7 .wpcf7 form.invalid .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.spam .wpcf7-response-output {
    background: rgba(251, 113, 133, 0.14);
    border-color: rgba(251, 113, 133, 0.45);
    color: #ffe4e6;
}

.ai-chat-form--cf7 .wpcf7 form.mail_sent_ng .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.mail_failed .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.aborted .wpcf7-response-output {
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.48);
    color: #fef3c7;
}
/* === CF7 polish v2 (button + messages + micro-motion) === */
.ai-chat-form--cf7 .ai-chat-footer {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ai-chat-form--cf7 .ai-chat-submit-btn,
.ai-chat-form--cf7 .wpcf7-submit {
    width: auto !important;
    min-width: 250px;
    max-width: 320px;
    justify-content: center;
    text-align: center;
    padding: 14px 26px;
    border-radius: 12px;
    letter-spacing: normal;
    line-height: 1;
}

.ai-chat-form--cf7 .ai-chat-submit-btn .material-symbols-outlined {
    font-size: 18px;
    transition: transform 180ms ease;
}

.ai-chat-form--cf7 .ai-chat-submit-btn:hover .material-symbols-outlined {
    transform: translateX(3px);
}

.ai-chat-form--cf7 .wpcf7-spinner {
    vertical-align: middle;
    margin-left: 10px;
}

.ai-chat-form--cf7 .wpcf7-submit[disabled],
.ai-chat-form--cf7 .ai-chat-submit-btn[disabled] {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none !important;
    filter: saturate(0.8) grayscale(0.12);
}

.ai-chat-form--cf7 .wpcf7-not-valid-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(251, 113, 133, 0.45);
    background: rgba(251, 113, 133, 0.13);
    color: #ffe4e6;
    font-size: 12px;
    line-height: 1.35;
}

.ai-chat-form--cf7 .wpcf7-not-valid-tip::before {
    content: "!";
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(251, 113, 133, 0.24);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@keyframes psoftCf7ToastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-form--cf7 .wpcf7-response-output {
    position: relative;
    margin-top: 14px;
    padding: 12px 14px 12px 40px;
    border-radius: 12px;
    border: 1px solid transparent;
    line-height: 1.45;
    font-size: 13px;
    animation: psoftCf7ToastIn 260ms ease both;
}

.ai-chat-form--cf7 .wpcf7-response-output::before {
    content: "i";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output::before {
    content: "Р В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р Р†Р вЂљРІвЂћСћР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р Р†РІР‚С›РЎС›Р В Р’В Р Р†Р вЂљРІвЂћСћР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р Р†Р вЂљРІвЂћСћР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р Р†Р вЂљРІвЂћСћР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р Р†Р вЂљРІвЂћСћР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р Р†РІР‚С›РІР‚вЂњР В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљРІвЂћвЂ“Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р Р†Р вЂљРЎвЂќР В Р’В Р В Р вЂ№Р В Р Р‹Р Р†Р вЂљРЎвЂќР В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р Р†Р вЂљРІвЂћСћР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р Р†Р вЂљРІвЂћСћР В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В Р вЂ№Р В Р вЂ Р Р†Р вЂљРЎвЂєР РЋРЎвЂєР В Р’В Р вЂ™Р’В Р В РІР‚в„ўР вЂ™Р’В Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљРІвЂћвЂ“Р В Р’В Р вЂ™Р’В Р В Р’В Р В РІР‚в„–Р В Р’В Р В РІР‚В Р В Р вЂ Р В РІР‚С™Р РЋРІР‚С”Р В Р Р‹Р РЋРІР‚С”";
    background: rgba(34, 197, 94, 0.26);
    color: #dcfce7;
}

.ai-chat-form--cf7 .wpcf7 form.invalid .wpcf7-response-output::before,
.ai-chat-form--cf7 .wpcf7 form.unaccepted .wpcf7-response-output::before,
.ai-chat-form--cf7 .wpcf7 form.spam .wpcf7-response-output::before {
    content: "!";
    background: rgba(251, 113, 133, 0.24);
    color: #ffe4e6;
}

.ai-chat-form--cf7 .wpcf7 form.mail_sent_ng .wpcf7-response-output::before,
.ai-chat-form--cf7 .wpcf7 form.mail_failed .wpcf7-response-output::before,
.ai-chat-form--cf7 .wpcf7 form.aborted .wpcf7-response-output::before {
    content: "!";
    background: rgba(251, 191, 36, 0.24);
    color: #fef3c7;
}

.ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3), 0 8px 20px rgba(34, 197, 94, 0.1);
}

.ai-chat-form--cf7 .wpcf7 form.invalid .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.spam .wpcf7-response-output {
    box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.3), 0 8px 20px rgba(251, 113, 133, 0.08);
}

.ai-chat-form--cf7 .wpcf7 form.mail_sent_ng .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.mail_failed .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.aborted .wpcf7-response-output {
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 8px 20px rgba(251, 191, 36, 0.08);
}

@media (max-width: 767px) {
    .ai-chat-form--cf7 .ai-chat-footer {
        align-items: stretch;
    }

    .ai-chat-form--cf7 .ai-chat-submit-btn,
    .ai-chat-form--cf7 .wpcf7-submit {
        width: 100% !important;
        max-width: none;
        min-width: 0;
    }
}
/* === CF7 final polish (overrides) === */
.ai-chat-form--cf7 .ai-chat-submit-btn,
.ai-chat-form--cf7 .wpcf7-submit {
    width: fit-content !important;
    min-width: 228px;
    max-width: 286px;
    padding: 13px 22px;
    border-radius: 12px;
    letter-spacing: normal;
    line-height: 1;
}

.ai-chat-form--cf7 .wpcf7-not-valid-tip {
    margin-top: 9px;
    padding: 7px 11px;
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(251, 113, 133, 0.2), rgba(251, 113, 133, 0.1));
}

.ai-chat-form--cf7 .wpcf7-response-output {
    padding: 13px 15px 13px 42px;
    border-radius: 12px;
    font-weight: 600;
}

.ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output::before {
    content: "\2713";
}

.ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.11));
    border-color: rgba(34, 197, 94, 0.48);
    color: #ecfdf5;
}

.ai-chat-form--cf7 .wpcf7 form.invalid .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.spam .wpcf7-response-output {
    background: linear-gradient(180deg, rgba(251, 113, 133, 0.2), rgba(251, 113, 133, 0.12));
    border-color: rgba(251, 113, 133, 0.52);
}

.ai-chat-form--cf7 .wpcf7 form.mail_sent_ng .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.mail_failed .wpcf7-response-output,
.ai-chat-form--cf7 .wpcf7 form.aborted .wpcf7-response-output {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.11));
    border-color: rgba(251, 191, 36, 0.5);
}

@media (max-width: 767px) {
    .ai-chat-form--cf7 .ai-chat-submit-btn,
    .ai-chat-form--cf7 .wpcf7-submit {
        width: 100% !important;
        max-width: none;
        min-width: 0;
    }
}


/* === Contact wow micro-interactions === */
.ai-contact-section .ai-chat-container {
    position: relative;
    isolation: isolate;
    transition: box-shadow 260ms ease, border-color 260ms ease, transform 260ms ease;
}

.ai-contact-section .ai-chat-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 260ms ease;
    background: radial-gradient(
        380px circle at var(--cf7-glow-x, 50%) var(--cf7-glow-y, 50%),
        rgba(246, 193, 46, 0.12),
        rgba(246, 193, 46, 0.03) 38%,
        transparent 68%
    );
}

.ai-contact-section .ai-chat-container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ai-contact-section .ai-chat-container > * {
    position: relative;
    z-index: 1;
}

.ai-contact-section .ai-chat-container.is-pointer-active {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(246, 193, 46, 0.15);
}

.ai-contact-section .ai-chat-container.is-pointer-active::before {
    opacity: 1;
}

.ai-contact-section .ai-chat-form--cf7 .cf7-stagger-item {
    opacity: 0;
    transform: translateY(6px);
    animation: cf7FieldIn 380ms ease forwards;
    animation-delay: calc(var(--cf7-stagger, 0) * 30ms);
}

@keyframes cf7FieldIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-form-control-wrap {
    transition: transform 180ms ease, filter 180ms ease;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-form-control-wrap:focus-within {
    transform: translateY(-1px);
    filter: drop-shadow(0 8px 20px rgba(246, 193, 46, 0.13));
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-submit {
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
    box-shadow: 0 10px 24px rgba(246, 193, 46, 0.28);
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(246, 193, 46, 0.36);
}

.ai-contact-section .ai-chat-container.cf7-state-sent .wpcf7-submit {
    animation: cf7SuccessPulse 720ms ease;
}

@keyframes cf7SuccessPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 24px rgba(246, 193, 46, 0.28);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.18), 0 20px 34px rgba(34, 197, 94, 0.16);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 24px rgba(246, 193, 46, 0.28);
    }
}

.ai-contact-section .ai-chat-container.cf7-state-invalid {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(251, 113, 133, 0.35);
}

.ai-contact-section .ai-chat-container.cf7-state-failed {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(251, 191, 36, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .ai-contact-section .ai-chat-container,
    .ai-contact-section .ai-chat-form--cf7 .wpcf7-form-control-wrap,
    .ai-contact-section .ai-chat-form--cf7 .wpcf7-submit,
    .ai-contact-section .ai-chat-form--cf7 .cf7-stagger-item {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .ai-contact-section .ai-chat-container::before {
        display: none;
    }
}

/* === Contact final refinement: no glow + premium messages + label fix === */
.ai-contact-section .ai-chat-container::before {
    display: none !important;
}

.ai-contact-section .ai-chat-container.is-pointer-active {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-form-control-wrap {
    position: relative;
}

.ai-contact-section .ai-chat-form--cf7 .ai-chat-field-label {
    top: -9px;
    left: 14px;
    z-index: 3;
    border-radius: 999px;
    background: linear-gradient(180deg, #102a35, #0c2029);
    box-shadow: 0 0 0 4px rgba(9, 27, 34, 0.95);
    padding: 0 8px;
    line-height: 1.2;
}

.ai-contact-section .ai-chat-form--cf7 input[type="text"],
.ai-contact-section .ai-chat-form--cf7 input[type="email"],
.ai-contact-section .ai-chat-form--cf7 input[type="tel"],
.ai-contact-section .ai-chat-form--cf7 textarea {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ai-contact-section .ai-chat-form--cf7 input[type="text"]:focus,
.ai-contact-section .ai-chat-form--cf7 input[type="email"]:focus,
.ai-contact-section .ai-chat-form--cf7 input[type="tel"]:focus,
.ai-contact-section .ai-chat-form--cf7 textarea:focus {
    border-color: rgba(246, 193, 46, 0.9);
    box-shadow: 0 0 0 2px rgba(246, 193, 46, 0.28), 0 10px 24px rgba(246, 193, 46, 0.14);
    transform: translateY(-1px);
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-response-output {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-response-output::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.13) 50%, transparent 100%);
    transform: translateX(-120%);
    animation: cf7ToastSheen 1200ms ease 120ms 1;
}

@keyframes cf7ToastSheen {
    to {
        transform: translateX(120%);
    }
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.16));
    border-color: rgba(52, 211, 153, 0.65);
    color: #ecfdf5;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.invalid .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.spam .wpcf7-response-output {
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.24), rgba(225, 29, 72, 0.16));
    border-color: rgba(251, 113, 133, 0.72);
    color: #fff1f2;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.mail_sent_ng .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.mail_failed .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.aborted .wpcf7-response-output {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.26), rgba(217, 119, 6, 0.17));
    border-color: rgba(251, 191, 36, 0.75);
    color: #fffbeb;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-not-valid-tip {
    border-color: rgba(251, 113, 133, 0.65);
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.24), rgba(225, 29, 72, 0.14));
    color: #fff1f2;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-submit {
    min-height: 56px;
}

@media (prefers-reduced-motion: reduce) {
    .ai-contact-section .ai-chat-form--cf7 .wpcf7-response-output::after {
        display: none;
    }
}

/* === CF7 message theme #1: premium glass alerts === */
.ai-contact-section .ai-chat-form--cf7 .wpcf7-response-output {
    --msg-accent: rgba(148, 163, 184, 0.7);
    --msg-bg-1: rgba(15, 23, 42, 0.7);
    --msg-bg-2: rgba(30, 41, 59, 0.55);
    margin-top: 14px;
    padding: 14px 16px 14px 46px;
    border-radius: 14px;
    border: 1px solid var(--msg-accent);
    color: #e2e8f0;
    background:
        linear-gradient(140deg, var(--msg-bg-1), var(--msg-bg-2)),
        radial-gradient(140px circle at 16% 0%, rgba(255, 255, 255, 0.12), transparent 62%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 10px 26px rgba(2, 6, 23, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-response-output::before {
    content: "i";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #0b1220;
    background: #cbd5e1;
    box-shadow: 0 0 0 4px rgba(203, 213, 225, 0.16);
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output {
    --msg-accent: rgba(16, 185, 129, 0.72);
    --msg-bg-1: rgba(3, 105, 88, 0.34);
    --msg-bg-2: rgba(6, 78, 59, 0.24);
    color: #ecfdf5;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.sent .wpcf7-response-output::before {
    content: "\2713";
    color: #022c22;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.invalid .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.spam .wpcf7-response-output {
    --msg-accent: rgba(251, 113, 133, 0.76);
    --msg-bg-1: rgba(159, 18, 57, 0.34);
    --msg-bg-2: rgba(136, 19, 55, 0.24);
    color: #fff1f2;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.invalid .wpcf7-response-output::before,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.unaccepted .wpcf7-response-output::before,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.spam .wpcf7-response-output::before {
    content: "!";
    color: #4c0519;
    background: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.2);
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.mail_sent_ng .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.mail_failed .wpcf7-response-output,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.aborted .wpcf7-response-output {
    --msg-accent: rgba(251, 191, 36, 0.8);
    --msg-bg-1: rgba(133, 77, 14, 0.34);
    --msg-bg-2: rgba(120, 53, 15, 0.24);
    color: #fffbeb;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.mail_sent_ng .wpcf7-response-output::before,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.mail_failed .wpcf7-response-output::before,
.ai-contact-section .ai-chat-form--cf7 .wpcf7 form.aborted .wpcf7-response-output::before {
    content: "!";
    color: #451a03;
    background: #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
}

/* === Contact labels refinement: clean minimal captions === */
.ai-contact-section .ai-chat-form--cf7 .ai-chat-field-label {
    position: static;
    display: inline-flex;
    align-items: center;
    margin: 0 0 8px 2px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: normal;
    font-size: 11px;
    line-height: 1.2;
    color: var(--color-primary);
    opacity: 0.95;
}

.ai-contact-section .ai-chat-form--cf7 .ai-chat-field-wrapper {
    position: relative;
}

.ai-contact-section .ai-chat-form--cf7 .wpcf7-form-control-wrap {
    display: block;
}

/* === Contact typing effect === */
.ai-contact-section .ai-chat-message-main,
.ai-contact-section .ai-chat-message-highlight {
    display: inline;
}

.ai-contact-section .ai-chat-message-main.is-typing::after,
.ai-contact-section .ai-chat-message-highlight.is-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -0.12em;
    background: currentColor;
    animation: aiTypingCursor 700ms steps(1, end) infinite;
    opacity: 0.9;
}

@keyframes aiTypingCursor {
    50% {
        opacity: 0;
    }
}

/* === Contact intro appear choreography === */
.ai-contact-section .ai-chat-message-row {
    max-height: 260px;
    opacity: 1;
    transform: translateY(0) scale(1);
    margin: 0;
    overflow: hidden;
    transition:
        max-height 260ms ease,
        opacity 220ms ease,
        transform 260ms ease,
        margin 260ms ease;
}

.ai-contact-section.typing-pending .ai-chat-message-row {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
    margin-bottom: -19px; /* compensates flex gap before reveal */
    pointer-events: none;
}

.ai-contact-section .ai-chat-bot-icon-bg,
.ai-contact-section .ai-chat-message-bubble {
    transition: opacity 220ms ease, transform 240ms ease;
}

.ai-contact-section.typing-pending .ai-chat-bot-icon-bg,
.ai-contact-section.typing-pending .ai-chat-message-bubble {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
}

.ai-contact-section.typing-revealed .ai-chat-bot-icon-bg,
.ai-contact-section.typing-revealed .ai-chat-message-bubble {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .ai-contact-section .ai-chat-message-row,
    .ai-contact-section .ai-chat-bot-icon-bg,
    .ai-contact-section .ai-chat-message-bubble {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
        max-height: none !important;
        margin-bottom: 0 !important;
    }
}

/* iOS/WebKit safety: never keep CF7 controls hidden if animation is skipped */
.ai-contact-section .ai-chat-form--cf7 .cf7-stagger-item {
    animation-fill-mode: forwards;
}

@supports (-webkit-touch-callout: none) {
    .ai-contact-section .ai-chat-form--cf7 .cf7-stagger-item {
        opacity: 1;
    }
}

/* Final premium CTA override for AI chat submit */
.ai-chat-form--cf7 .ai-chat-submit-btn,
.ai-chat-form--cf7 .wpcf7-submit {
    position: relative;
    isolation: isolate;
    box-shadow: 0 8px 20px rgba(246,193,46,0.16), inset 0 1px 0 rgba(255,255,255,0.22);
    transition:
        transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 240ms ease,
        color 240ms ease;
}

.ai-chat-form--cf7 .ai-chat-submit-btn::before,
.ai-chat-form--cf7 .wpcf7-submit::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 50%, rgba(246,193,46,0.30) 0%, rgba(246,193,46,0.12) 38%, rgba(246,193,46,0.00) 72%);
    filter: blur(18px);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 240ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: -1;
}

.ai-chat-form--cf7 .ai-chat-submit-btn:hover,
.ai-chat-form--cf7 .wpcf7-submit:hover,
.ai-contact-section .ai-chat-form--cf7 .wpcf7-submit:hover {
    background-color: var(--yellow-400);
    transform: translateY(-2px);
    color: var(--color-blue-dark);
    box-shadow: 0 16px 30px rgba(246,193,46,0.24), 0 6px 14px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.28);
}

.ai-chat-form--cf7 .ai-chat-submit-btn:hover::before,
.ai-chat-form--cf7 .wpcf7-submit:hover::before,
.ai-contact-section .ai-chat-form--cf7 .wpcf7-submit:hover::before {
    opacity: 1;
    transform: scale(1);
}


/* === Contact form: premium gold edge — border only, keep original panel background === */
.ai-contact-section .ai-chat-container {
    --ai-contact-gold-edge: rgba(246, 193, 46, 0.68);
    --ai-contact-gold-edge-soft: rgba(246, 193, 46, 0.16);
    position: relative;
    isolation: isolate;
    border-color: rgba(246, 193, 46, 0.22);
    background-clip: padding-box;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(246, 193, 46, 0.05),
        0 0 34px rgba(246, 193, 46, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ai-contact-section .ai-chat-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(246, 193, 46, 0.58) 18%,
        rgba(246, 193, 46, 0.12) 38%,
        rgba(20, 184, 166, 0.14) 58%,
        rgba(246, 193, 46, 0.42) 82%,
        rgba(255, 244, 190, 0.2) 100%
    );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 26px rgba(246, 193, 46, 0.08);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.ai-contact-section .ai-chat-container.is-pointer-active,
.ai-contact-section .ai-chat-container:focus-within {
    box-shadow:
        0 28px 58px -14px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(246, 193, 46, 0.08),
        0 0 38px rgba(246, 193, 46, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-contact-section .ai-chat-container.cf7-state-invalid {
    border-color: rgba(251, 113, 133, 0.32);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(251, 113, 133, 0.16),
        0 0 34px rgba(251, 113, 133, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ai-contact-section .ai-chat-container.cf7-state-invalid::after {
    background: linear-gradient(
        135deg,
        rgba(251, 113, 133, 0.64),
        rgba(246, 193, 46, 0.1),
        rgba(251, 113, 133, 0.42)
    );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 26px rgba(251, 113, 133, 0.08);
}

.ai-contact-section .ai-chat-container.cf7-state-failed {
    border-color: rgba(251, 191, 36, 0.34);
}

.ai-contact-section .ai-chat-container.cf7-state-failed::after {
    background: linear-gradient(
        135deg,
        rgba(251, 191, 36, 0.66),
        rgba(246, 193, 46, 0.12),
        rgba(251, 191, 36, 0.44)
    );
}

@media (max-width: 767px) {
    .ai-contact-section .ai-chat-container::after {
        padding: 1px;
    }
}
