:root {
    --amb-request-blue: #4aafe0;
    --amb-request-blue-dark: #3395c6;
    --amb-request-ink: #1f2937;
    --amb-request-field: #e8e8e8;
}

.amb-request-portal {
    width: 100%;
}

.amb-request-portal [data-service-panel="comercial"] .elementor-field-group-comercial_instalacao:not(.amb-installation-visible) {
    display: none !important;
}

.amb-request-document-guidance {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.5;
}

body.page-id-362 .elementor-element.elementor-element-2c854fa {
    width: auto !important;
}

.amb-request-step {
    padding: 20px 20px 0;
    text-align: center;
}

.amb-request-step__title {
    margin: 0 0 18px;
    color: var(--amb-request-ink);
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 700;
}

.amb-request-purpose {
    --amb-request-purpose-blue: #237da5;
    display: grid;
    grid-template-columns: 1fr 1.65fr 1.8fr 1fr 1fr;
    gap: 12px;
    max-width: 1040px;
    margin: 0 auto 24px;
}

.amb-request-purpose__button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 64px;
    padding: 11px 16px;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #333333 !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}

/* Keep the one-line labels centered despite the global theme button styles. */
.amb-request-portal .amb-request-purpose__button[data-service="orcamento"],
.amb-request-portal .amb-request-purpose__button[data-service="comercial"] {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-left: 12px;
    padding-right: 12px;
}

.amb-request-purpose__button small {
    display: block;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
}

.amb-request-purpose__button:hover,
.amb-request-purpose__button:focus-visible {
    border-color: var(--amb-request-blue) !important;
    color: var(--amb-request-purpose-blue) !important;
}

.amb-request-purpose__button.is-active {
    border-color: var(--amb-request-purpose-blue) !important;
    background: var(--amb-request-purpose-blue) !important;
    color: #ffffff !important;
}

.amb-request-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 120px;
    background-color: #32383d;
    background-image: url('service-request-hero.webp');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.amb-request-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 24, 35, 0.58);
}

.amb-request-hero.is-generic {
    min-height: 280px;
    padding-top: 54px;
    padding-bottom: 96px;
}

.amb-request-hero.is-generic .amb-request-hero__title {
    margin-bottom: 0;
}

.amb-request-hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    text-align: center;
}

.amb-request-hero__title {
    margin: 0 0 44px;
    color: #ffffff !important;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.amb-request-equipment {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.amb-request-equipment[hidden] {
    display: none !important;
}

.amb-request-equipment__button {
    display: flex !important;
    min-width: 0;
    width: 100%;
    height: 100%;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px;
    padding: 10px 4px !important;
    border: 0 !important;
    background: transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: transform 0.2s;
}

.amb-request-equipment__button:hover,
.amb-request-equipment__button:focus-visible {
    transform: translateY(-4px);
}

.amb-request-equipment__button img {
    display: block !important;
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.2s;
}

.amb-request-equipment__button span {
    display: block;
    width: 100%;
    min-height: 32px;
    max-width: 150px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
}

.amb-request-equipment__button.is-active img {
    transform: scale(1.08);
}

.amb-request-equipment__button.is-active span {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.amb-request-card {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: -60px auto 40px;
    padding: 32px 36px 36px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

.amb-request-form-title {
    margin: 0 0 24px;
    color: var(--amb-request-ink);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.amb-request-frame {
    position: relative;
    overflow: hidden;
    /* Clip inactive panels without letting field focus scroll this frame. */
    overflow: clip;
    transition: height 0.28s ease;
}

.amb-request-service-panel,
.amb-request-budget-form {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.amb-request-service-panel.is-active,
.amb-request-budget-form.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.amb-request-service-panel.is-active .amb-request-budget-form:not(.is-active) {
    position: absolute;
}

.amb-request-card .elementor-field-group {
    box-sizing: border-box;
    padding-right: 8px !important;
    padding-left: 8px !important;
    margin-bottom: 12px !important;
}

.amb-request-card .elementor-field-group .elementor-field {
    min-height: 48px;
    padding: 12px 16px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--amb-request-field) !important;
    font-size: 14px !important;
}

.amb-request-card .elementor-field-group .elementor-field:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(74, 175, 224, 0.22) !important;
}

.amb-request-card .elementor-field-group .elementor-select-wrapper.elementor-field {
    min-height: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.amb-request-card .elementor-field-group .elementor-select-wrapper select.elementor-field-textual {
    width: 100%;
    min-height: 48px;
    padding: 12px 44px 12px 16px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--amb-request-field) !important;
    font-size: 14px !important;
    cursor: pointer;
}

.amb-request-card .elementor-field-group .elementor-select-wrapper select.elementor-field-textual:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(74, 175, 224, 0.22) !important;
}

.amb-request-card .elementor-select-wrapper .select-caret-down-wrapper {
    right: 16px;
    pointer-events: none;
}

.amb-request-card input[name="form_fields[altura]"]::placeholder {
    color: #4b5563;
    opacity: 1;
}

.amb-request-card textarea.elementor-field {
    min-height: 130px !important;
    resize: vertical;
}

.amb-request-card input[type="file"] {
    width: 100% !important;
    min-height: 48px;
    padding: 12px 16px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--amb-request-field) !important;
    color: #4b5563 !important;
    cursor: pointer !important;
}

.amb-request-card input[type="file"]::file-selector-button {
    padding: 0 8px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #4b5563 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.amb-request-card .elementor-field-type-recaptcha_v3 {
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.amb-request-card .elementor-field-type-recaptcha_v3 > .elementor-field {
    min-height: 0 !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.amb-request-card .elementor-button,
.amb-request-card button[type="submit"] {
    display: block !important;
    min-width: 220px;
    margin: 24px auto 0 !important;
    padding: 15px 46px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--amb-request-blue) !important;
    color: #ffffff !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: 0;
    text-transform: uppercase;
}

.amb-request-card .elementor-button:hover,
.amb-request-card button[type="submit"]:hover {
    background: var(--amb-request-blue-dark) !important;
}

.amb-request-error {
    padding: 24px;
    border-left: 4px solid #e74c3c;
    background: #fff5f4;
    color: #8b241a;
}

@media (max-width: 900px) {
    .amb-request-purpose {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .amb-request-purpose__button:nth-child(-n+3) {
        grid-column: 1 / -1;
    }

    .amb-request-equipment {
        gap: 12px;
    }

    .amb-request-equipment__button img {
        width: 88px;
        height: 88px;
    }

    .amb-request-equipment__button span {
        font-size: 10px;
    }
}

@media (max-width: 767px) {
    .amb-request-purpose {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .amb-request-purpose__button:nth-child(-n+3) {
        grid-column: 1 / -1;
    }

    .amb-request-purpose__button {
        min-height: 44px;
        padding: 9px 14px;
        font-size: 14px;
    }

    .amb-request-hero {
        min-height: 480px;
        padding: 40px 14px 92px;
        background-position: 48% center;
    }

    .amb-request-hero__title {
        margin-bottom: 32px;
    }

    .amb-request-hero.is-generic {
        min-height: 240px;
        padding: 44px 14px 82px;
    }

    .amb-request-equipment {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 6px;
    }

    .amb-request-equipment__button img {
        width: 64px;
        height: 64px;
    }

    .amb-request-equipment__button span {
        max-width: 100px;
        font-size: 9px;
    }

    .amb-request-card {
        margin: -42px 12px 30px;
        padding: 24px 18px 28px;
        border-radius: 14px;
    }
}

@media (max-width: 420px) {
    .amb-request-purpose__button {
        flex: 1 1 calc(50% - 8px);
    }

    .amb-request-equipment__button img {
        width: 56px;
        height: 56px;
    }
}
