/* TEG quote form — compact, premium modal */

.teg-quote-modal .teg-quote-modal__dialog {
    max-width: 700px;
    margin: 0.65rem auto;
    max-height: calc(100vh - 1.25rem);
}

.teg-quote-modal__content {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 1.25rem);
    overflow: hidden;
    border: none;
    border-radius: 16px;
    background: #fafbfc;
    box-shadow:
        0 4px 6px rgba(1, 43, 80, 0.04),
        0 20px 48px rgba(1, 43, 80, 0.14);
}

.teg-quote-modal__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #012b50 0%, #0d4a82 45%, #ffa701 100%);
    z-index: 2;
    flex-shrink: 0;
}

.teg-quote-modal__header {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    border: none;
    padding: 0.85rem 1.15rem 0.4rem;
    background: #fff;
}

.teg-quote-modal__intro {
    padding-right: 1.75rem;
}

.teg-quote-modal__title {
    margin: 0;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.15;
    color: #ffa701;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.teg-quote-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.teg-quote-modal__close:hover {
    opacity: 1;
    transform: scale(1.05);
}

.teg-quote-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.35rem 1.15rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.teg-quote-form {
    position: relative;
}

.teg-quote-form__overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 20;
    align-items: center;
    justify-content: center;
    background: rgba(250, 251, 252, 0.88);
    backdrop-filter: blur(3px);
    border-radius: 10px;
}

.teg-quote-form--submitting .teg-quote-form__overlay {
    display: flex;
}

.teg-quote-form__overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.teg-quote-form__overlay-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #012b50;
}

.teg-quote-section-head {
    margin-bottom: -0.15rem;
}

.teg-quote-section-title {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}

.teg-quote-divider {
    height: 1px;
    margin: 0.1rem 0;
    padding: 0;
    background: linear-gradient(90deg, transparent, #e2e8f0 15%, #e2e8f0 85%, transparent);
}

.teg-quote-field {
    position: relative;
    margin-bottom: 0;
}

.teg-quote-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #334155;
    line-height: 1.25;
}

.teg-quote-req {
    color: #e67e22;
    font-weight: 700;
}

.teg-quote-input {
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.teg-quote-input::placeholder {
    color: #94a3b8;
}

.teg-quote-input:hover:not(:disabled) {
    border-color: #cbd5e1;
}

.teg-quote-input:focus {
    border-color: #012b50;
    box-shadow: 0 0 0 3px rgba(1, 43, 80, 0.1);
    outline: none;
}

.teg-quote-input.is-invalid,
.teg-quote-file-input.is-invalid + .teg-quote-upload__trigger {
    border-color: #dc3545;
}

.teg-quote-field .invalid-feedback {
    display: none;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.teg-quote-input.is-invalid ~ .invalid-feedback,
.teg-quote-upload:has(.teg-quote-file-input.is-invalid) ~ .invalid-feedback {
    display: block;
}

.teg-quote-select-wrap {
    position: relative;
}

.teg-quote-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.85rem;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.teg-quote-select-wrap .teg-quote-input {
    padding-right: 2rem;
    appearance: none;
}

.teg-quote-textarea {
    min-height: 64px;
    resize: vertical;
}

/* File upload — icon left, copy right */
.teg-quote-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.teg-quote-upload__trigger {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: 64px;
    padding: 0.65rem 0.85rem;
    margin: 0;
    text-align: left;
    cursor: pointer;
    background: #fff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.teg-quote-upload__trigger:hover {
    border-color: #ffa701;
    background: rgba(255, 167, 1, 0.06);
}

.teg-quote-upload--has-file .teg-quote-upload__trigger {
    border-style: solid;
    border-color: rgba(255, 167, 1, 0.55);
    background: rgba(255, 167, 1, 0.08);
}

.teg-quote-upload__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    color: #012b50;
    background: linear-gradient(145deg, #ffd36a 0%, #ffa701 100%);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(255, 167, 1, 0.28);
}

.teg-quote-upload__copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
}

.teg-quote-upload__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}

.teg-quote-upload__hint {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
    word-break: break-word;
}

.teg-quote-consent-card {
    padding: 0.6rem 0.75rem;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
}

.teg-quote-consent {
    margin-bottom: 0.35rem;
}

.teg-quote-consent .form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.12em;
    border-radius: 3px;
}

.teg-quote-consent .form-check-input:checked {
    background-color: #012b50;
    border-color: #012b50;
}

.teg-quote-consent .form-check-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.35;
}

.teg-quote-consent-note {
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: #94a3b8;
    max-height: 3.25rem;
    overflow-y: auto;
}

.teg-quote-form__actions {
    padding-top: 0.15rem;
}

.teg-quote-alert--error {
    display: none;
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
}

.teg-quote-alert--error[style*="block"],
.teg-quote-alert--error.is-visible {
    display: block;
}

/* Submit — matches site .bbtn / login (yellow → white on hover) */
.teg-quote-form .teg-quote-submit.bbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 0;
    padding: 0.65rem 1.5rem;
    font-size: 22px;
    font-family: 'P-Regular', 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.25;
    color: #fff;
    text-transform: none;
    border: 1px solid transparent;
    border-radius: 30px;
    background-color: var(--c2, #ffa701);
    filter: drop-shadow(0 4px 10px rgba(255, 167, 1, 0.35));
    box-shadow: none;
    transition: color 0.35s ease, background-color 0.35s ease, border-color 0.35s ease, transform 0.2s ease;
}

.teg-quote-form .teg-quote-submit.bbtn:hover:not(:disabled),
.teg-quote-form .teg-quote-submit.bbtn:focus-visible:not(:disabled) {
    color: #000;
    border: 1px solid #000;
    background-color: #fff;
    transform: translateY(-1px);
}

.teg-quote-form .teg-quote-submit.bbtn:disabled {
    cursor: wait;
    opacity: 0.9;
}

.teg-quote-submit__label,
.teg-quote-submit__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.teg-quote-submit__loading {
    display: none;
    font-size: 22px;
    font-weight: 400;
    color: inherit;
}

.teg-quote-submit.is-loading .teg-quote-submit__label {
    display: none;
}

.teg-quote-submit.is-loading .teg-quote-submit__loading {
    display: flex;
}

.teg-quote-submit .teg-quote-spinner {
    border-color: rgba(0, 0, 0, 0.12);
    border-top-color: #012b50;
}

.teg-quote-submit.is-loading .teg-quote-spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: #012b50;
}

.teg-quote-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-top-color: #012b50;
    border-radius: 50%;
    animation: teg-quote-spin 0.7s linear infinite;
}

.teg-quote-spinner--lg {
    width: 1.75rem;
    height: 1.75rem;
    border-width: 3px;
    border-color: rgba(1, 43, 80, 0.15);
    border-top-color: #012b50;
}

@keyframes teg-quote-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Thank you modal */
.teg-quote-thanks-modal .modal-dialog {
    max-width: 380px;
}

.teg-quote-thanks-modal__content {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(1, 43, 80, 0.08);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 56px rgba(1, 43, 80, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.teg-quote-thanks-modal__content::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #012b50 0%, #0a4f88 52%, #ffa701 100%);
}

.teg-quote-thanks-modal__glow {
    position: absolute;
    top: -52%;
    left: 50%;
    width: 290px;
    height: 290px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 167, 1, 0.25) 0%, rgba(1, 43, 80, 0.04) 58%, transparent 76%);
    pointer-events: none;
}

.teg-quote-thanks-modal__body {
    position: relative;
    z-index: 1;
    padding: 2.25rem 1.75rem 2rem;
    text-align: center;
}

.teg-quote-thanks-modal__icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 0.95rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(1, 43, 80, 0.06) 0%, rgba(255, 167, 1, 0.12) 100%);
    border: 1px solid rgba(1, 43, 80, 0.14);
}

.teg-quote-thanks-check {
    width: 100%;
    height: 100%;
}

.teg-quote-thanks-check__circle {
    stroke: #012b50;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: teg-thanks-stroke 0.55s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.teg-quote-thanks-check__path {
    stroke: #ffa701;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: teg-thanks-stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.35s forwards;
}

@keyframes teg-thanks-stroke {
    to {
        stroke-dashoffset: 0;
    }
}

.teg-quote-thanks-modal.show .teg-quote-thanks-modal__icon {
    animation: teg-thanks-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes teg-thanks-pop {
    from {
        transform: scale(0.6);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.teg-quote-thanks-modal__title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-family: "P-SemiBold", "Poppins", sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #012b50;
    text-transform: none;
}

.teg-quote-thanks-modal__message {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #64748b;
}

/* Floating “Get a Quote” pill — alignment with dock rails */
.teg-global-fabs .hero-fab-btn--quote.teg-open-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    text-decoration: none;
}

@media (max-width: 1499px) and (min-width: 768px) {
    .teg-global-fabs .hero-fab-btn--quote.teg-open-quote {
        align-self: center;
        margin: 0;
        line-height: 1.2;
    }

    .teg-global-fabs .hero-fab-rail--right {
        align-items: center;
    }
}

/* Laptop / short viewport (e.g. 1366×768) */
@media (max-height: 820px), (max-width: 1400px) {
    .teg-quote-modal .teg-quote-modal__dialog {
        max-width: min(680px, calc(100vw - 1.5rem));
        margin: 0.5rem auto;
        max-height: calc(100vh - 1rem);
    }

    .teg-quote-modal__content {
        max-height: calc(100vh - 1rem);
        border-radius: 14px;
    }

    .teg-quote-modal__header {
        padding: 0.7rem 1rem 0.3rem;
    }

    .teg-quote-modal__title {
        font-size: 30px;
        font-weight: 500;
        letter-spacing: 0.1em;
    }

    .teg-quote-modal__body {
        padding: 0.25rem 1rem 0.85rem;
    }

    .teg-quote-form__grid {
        --bs-gutter-y: 0.35rem;
        --bs-gutter-x: 0.5rem;
    }

    .teg-quote-upload__trigger {
        min-height: 58px;
    }

    .teg-quote-consent-note {
        max-height: 2.75rem;
    }
}

@media (max-width: 575px) {
    .teg-quote-modal .teg-quote-modal__dialog {
        max-width: calc(100vw - 0.75rem);
        margin: 0.375rem auto;
    }

    .teg-quote-modal__header,
    .teg-quote-modal__body {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .teg-quote-upload__trigger {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .teg-quote-upload__copy {
        align-items: center;
    }
}

/* Dedicated thank-you page */
.teg-thank-you-page {
    padding: clamp(28px, 4vw, 56px) 0 clamp(48px, 8vw, 88px);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
}

.teg-thank-you-card {
    padding: clamp(28px, 4vw, 44px);
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(1, 43, 80, 0.08);
    box-shadow: 0 18px 48px rgba(1, 43, 80, 0.08);
    text-align: center;
}

.teg-thank-you-card__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
}

.teg-thank-you-card__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffa701;
}

.teg-thank-you-card__lead {
    margin: 0 0 0.75rem;
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.5;
    color: #012b50;
    font-family: "P-SemiBold", sans-serif;
}

.teg-thank-you-card__text {
    margin: 0 auto 1.75rem;
    max-width: 38rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #64748b;
}

.teg-thank-you-card__text a {
    color: #012b50;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.teg-thank-you-card__text a:hover {
    color: #ffa701;
}

.teg-thank-you-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.teg-thank-you-card__btn {
    min-width: 200px;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    text-transform: none;
    border-radius: 30px;
}

.teg-thank-you-card__btn--primary {
    color: #fff;
    background-color: var(--c2, #ffa701);
    border: 1px solid var(--c2, #ffa701);
}

.teg-thank-you-card__btn--primary:hover,
.teg-thank-you-card__btn--primary:focus-visible {
    color: #000;
    background-color: #fff;
    border-color: #000;
}

.teg-thank-you-card__btn--secondary {
    color: #012b50;
    background-color: #fff;
    border: 1px solid #012b50;
}

.teg-thank-you-card__btn--secondary:hover,
.teg-thank-you-card__btn--secondary:focus-visible {
    color: #fff;
    background-color: #012b50;
}

@media (max-width: 575.98px) {
    .teg-thank-you-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .teg-thank-you-card__btn {
        width: 100%;
        min-width: 0;
    }
}
