/* Header consultation modal */
.tgwv-consultation-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 15px;
    background: rgba(17, 24, 39, 0.68);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.tgwv-consultation-modal[hidden] {
    display: none;
}

.tgwv-consultation-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.tgwv-consultation-modal__dialog {
    width: min(100%, 520px);
    max-height: min(720px, calc(100dvh - 48px));
    overflow: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    transform: translateY(8px) scale(0.985);
    transition: transform 0.18s ease;
}

.tgwv-consultation-modal.is-open .tgwv-consultation-modal__dialog {
    transform: translateY(0) scale(1);
}

.tgwv-consultation-modal__content {
    position: relative;
    padding: 32px 36px 36px;
}

.tgwv-consultation-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #4b5563;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.tgwv-consultation-modal__close:hover,
.tgwv-consultation-modal__close:focus-visible {
    background: #f3f4f6;
    color: #111827;
}

.tgwv-consultation-modal__close:focus-visible,
.tgwv-consultation-form input:focus-visible,
.tgwv-consultation-form textarea:focus-visible,
.tgwv-consultation-form__submit:focus-visible,
.tgwv-header-default .tgwv-header-default-contact-btn:focus-visible {
    outline: 3px solid rgba(var(--tgwv-primary-rgb), 0.28);
    outline-offset: 2px;
}

.tgwv-consultation-modal h2 {
    margin: 0 38px 8px 0;
    color: #1f2937;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

.tgwv-consultation-modal__description {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.tgwv-consultation-form {
    display: grid;
    gap: 16px;
}

.tgwv-consultation-form__field {
    min-width: 0;
}

.tgwv-consultation-form label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.tgwv-consultation-form label span {
    color: #b42318;
}

.tgwv-consultation-form input,
.tgwv-consultation-form textarea {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    padding: 10px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tgwv-consultation-form input {
    height: 42px;
}

.tgwv-consultation-form textarea {
    min-height: 104px;
    resize: vertical;
}

.tgwv-consultation-form input::placeholder,
.tgwv-consultation-form textarea::placeholder {
    color: #9ca3af;
}

.tgwv-consultation-form input:focus,
.tgwv-consultation-form textarea:focus {
    border-color: var(--tgwv-primary);
    box-shadow: 0 0 0 3px rgba(var(--tgwv-primary-rgb), 0.14);
    outline: none;
}

.tgwv-consultation-form__field.has-error input,
.tgwv-consultation-form__field.has-error textarea {
    border-color: #b42318;
}

.tgwv-consultation-form__error {
    min-height: 0;
    margin: 5px 0 0;
    color: #b42318;
    font-size: 12px;
    line-height: 1.4;
}

.tgwv-consultation-form__error:empty {
    display: none;
}

.tgwv-consultation-form__submit {
    width: 100%;
    min-height: 42px;
    margin-top: 4px;
    border: 1px solid var(--tgwv-primary);
    border-radius: 6px;
    background: var(--tgwv-primary);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.tgwv-consultation-form__submit:hover {
    border-color: var(--tgwv-primary-dark);
    background: var(--tgwv-primary-dark);
}

.tgwv-consultation-form__submit:disabled {
    cursor: wait;
    opacity: 0.7;
}

.tgwv-consultation-modal__status {
    margin: 0 0 16px;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
}

.tgwv-consultation-modal__status:not([hidden]) {
    display: block;
}

.tgwv-consultation-modal__status.is-success {
    background: #ecfdf3;
    color: #166534;
}

.tgwv-consultation-modal__status.is-error {
    background: #fef2f2;
    color: #b42318;
}

.tgwv-consultation-form__honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.tgwv-consultation-modal--open {
    overflow: hidden;
}

.tgwv-header-default .tgwv-header-default-contact-btn,
.tgwv-header-default-menu-sub .tgwv-header-default-contact-btn {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.tgwv-header-default .tgwv-header-default-mobile-consultation {
    display: none;
}

.tgwv-header-stacked__consultation-trigger {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--tgwv-primary);
    border-radius: 999px;
    background: var(--tgwv-primary);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.tgwv-header-stacked__consultation-trigger:hover {
    border-color: var(--tgwv-primary-dark);
    background: var(--tgwv-primary-dark);
}

@media (max-width: 991px) {
    .tgwv-header-default .tgwv-header-default-mobile-consultation {
        display: inline-flex;
        width: auto;
        min-width: 0;
        height: 36px;
        padding: 0 10px;
        font-size: 11px;
        line-height: 1;
    }

    .tgwv-header-stacked__consultation-trigger {
        min-height: 38px;
        padding: 0 10px;
        font-size: 11px;
    }
}

@media (max-width: 575px) {
    .tgwv-consultation-modal {
        align-items: flex-start;
        padding: 16px 10px;
    }

    .tgwv-consultation-modal__dialog {
        max-height: calc(100dvh - 32px);
    }

    .tgwv-consultation-modal__content {
        padding: 28px 20px 24px;
    }

    .tgwv-consultation-modal h2 {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tgwv-consultation-modal,
    .tgwv-consultation-modal__dialog,
    .tgwv-consultation-form input,
    .tgwv-consultation-form textarea,
    .tgwv-consultation-form__submit {
        transition: none;
    }
}
