/* Auto Glass World - quote form ([agw_quote_form]) */
.agw-qf {
    display: flex;
    flex-direction: column;
    padding: 22px 22px 18px;
    border-radius: 14px;
    background: var(--agw-color-paper);
    color: var(--agw-color-text);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
    scroll-margin-top: 90px;
}

.agw-qf :focus-visible {
    outline-color: var(--agw-color-primary);
}

.agw-qf [hidden] {
    display: none !important;
}


/* Referral banner ("Maria sent you"), shown only for a valid referral code (referral.js). */
.agw-qf-ref {
    align-self: flex-start;
    margin: 0 0 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--agw-color-pale);
    color: var(--agw-color-primary);
    font-size: var(--agw-fs-note);
    font-weight: 600;
    line-height: 1.3;
}

.agw-qf-title {
    margin: 0;
    color: var(--agw-color-text);
    font-size: 25px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}


/* No description: keep the same gap between the title and the fields. */
.agw-qf-title + .agw-qf-form {
    margin-top: 14px;
}

.agw-qf-desc {
    margin: 6px 0 14px;
    color: var(--agw-color-muted);
    font-size: 13.5px;
    line-height: 19px;
}

.agw-qf-form {
    display: flex;
    flex: 1;
    flex-direction: column;
}

/* Step blocks (data-form-step, for tracking) inside a grid: no box, the fields stay grid items. */
.agw-qf-step {
    display: contents;
}

.agw-qf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.agw-qf-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.agw-qf-field.is-full {
    grid-column: 1 / -1;
}

.agw-qf-cov-row {
    margin-top: -4px;
}

.agw-qf-field label {
    color: var(--agw-color-text);
    font-size: 13px;
    font-weight: 600;
}

.agw-qf-field input,
.agw-qf-field select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #b9b5aa;
    border-radius: 9px;
    background: var(--agw-color-white);
    color: var(--agw-color-text);
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Browser autofill (name, email, phone, ZIP): keep the field look instead of the yellow/blue fill. */
.agw-qf-field input:-webkit-autofill,
.agw-qf-field input:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px var(--agw-color-white) inset;
    -webkit-text-fill-color: var(--agw-color-text);
    caret-color: var(--agw-color-text);
    transition: background-color 9999s;
}

.agw-qf-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 3px rgba(38, 80, 188, 0.2), 0 0 0 1000px var(--agw-color-white) inset;
    -webkit-text-fill-color: var(--agw-color-text);
}

.agw-qf-field select:disabled,
.agw-qf-field input[readonly] {
    background: #efede7;
    color: #5b6270;
    cursor: not-allowed;
}

/* Plain selects (before Select2 loads on the first tap/focus) look exactly like the Select2 boxes:
   same small arrow, padding, height and grey placeholder, so nothing jumps when Select2 takes over. */
.agw-qf .agw-qf-field select {
    -webkit-appearance: none;
    appearance: none;
    height: 44px;
    padding: 0 34px 0 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 8px 5px;
    line-height: 42px;
    cursor: pointer;
}

.agw-qf .agw-qf-field select:has(option[value=""]:checked) {
    color: #6b7280;
}

.agw-qf .agw-qf-field select:disabled {
    color: #5b6270;
    cursor: not-allowed;
}

/* Auto-filled State: grey box like a locked field, value easy to read. */
.agw-qf .agw-qf-field input[readonly] {
    color: var(--agw-color-text);
    cursor: default;
}

.agw-qf-field input:focus,
.agw-qf-field select:focus {
    border-color: var(--agw-color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 80, 188, 0.2);
}

.agw-qf [aria-invalid="true"],
.agw-qf [aria-invalid="true"] + .select2-container .select2-selection--single {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.agw-qf-cov {
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

/* The message row only takes space when there is a message. */
.agw-qf-cov-row:has(.agw-qf-cov:empty) {
    display: none;
}

.agw-qf-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 8px;
    color: var(--agw-color-muted);
    font-family: var(--agw-font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.agw-qf-sub::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--agw-color-line);
}

.agw-qf-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    color: var(--agw-color-muted);
    font-size: 12px;
    line-height: 17px;
    cursor: pointer;
}

.agw-qf-consent input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--agw-color-primary);
}

.agw-qf-consent a {
    color: var(--agw-color-primary);
    text-decoration: underline;
}

.agw-qf-consent + .agw-qf-consent {
    margin-top: 10px;
}



.agw-qf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.agw-qf-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
}

.agw-qf-msg {
    padding: 10px 12px;
    border: 1px solid #c4d1ef;
    border-radius: 10px;
    background: #eef2fb;
    color: var(--agw-color-navy);
    font-size: 13px;
    line-height: 19px;
}

.agw-qf-msg.is-error {
    border-color: #f3b8b0;
    background: #fdecea;
    color: #7a1a12;
}

.agw-qf .agw-qf-submit {
    width: 100%;
    text-transform: capitalize; /* "Get My Quote", also for labels typed in admin */
}

/* Disabled until every required field is valid (and while sending). */
.agw-qf .agw-qf-submit:disabled {
    background: var(--agw-color-primary);
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.agw-qf-err {
    color: #b42318;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 17px;
}

/* Select2 dropdowns, styled like the inputs. */
.agw-qf .select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid #b9b5aa;
    border-radius: 9px;
    background: var(--agw-color-white);
}

.agw-qf .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 34px 0 12px;
    color: var(--agw-color-text);
    font-size: 15px;
    line-height: 42px;
}

.agw-qf .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6b7280;
}

.agw-qf .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0;
    right: 8px;
    height: 42px;
}

.agw-qf .select2-container--default.select2-container--disabled .select2-selection--single {
    background: #efede7;
    cursor: not-allowed;
}

.agw-qf .select2-container--default.select2-container--disabled .select2-selection__rendered {
    color: #5b6270;
}

.agw-qf .select2-container--focus .select2-selection--single,
.agw-qf .select2-container--open .select2-selection--single {
    border-color: var(--agw-color-primary);
    box-shadow: 0 0 0 3px rgba(38, 80, 188, 0.2);
}

.agw-qf .select2-dropdown {
    overflow: hidden;
    border-color: var(--agw-color-primary);
    border-radius: 9px;
    font-size: 15px;
}

.agw-qf .select2-search--dropdown .select2-search__field {
    min-height: 38px;
    padding: 6px 10px;
    border-color: #b9b5aa;
    border-radius: 6px;
    font-size: 16px;
}

.agw-qf .select2-results__option {
    padding: 8px 12px;
}

.agw-qf .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--agw-color-primary);
}

@media (max-width: 575px) {
    .agw-qf {
        padding: 18px 16px 16px;
    }

    .agw-qf-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* 16px stops iOS zooming into the field. */
    .agw-qf-field input,
    .agw-qf-field select,
    .agw-qf .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 16px;
    }
}
