/* Cascade-safe overrides for quote address controls. Loaded after styles.css. */
.quote-form .quote-address-suggestions li {
    display: block;
    min-height: 44px;
    padding: .75rem .85rem;
    font-size: .875rem;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.quote-form .quote-address-suggestions li small {
    display: block;
    color: var(--color-muted);
    font-size: .75rem;
}

.quote-form .quote-address-suggestions {
    max-height: min(20rem, 45vh);
    overscroll-behavior: contain;
}

.quote-form .quote-address-combobox > input {
    padding-right: 2.7rem;
    padding-left: 3.15rem !important;
}

.quote-form .quote-input-shell > input,
.quote-form .quote-input-shell > select {
    padding-right: 2.65rem;
}

.quote-form .quote-input-shell--select > select {
    padding-right: 4.25rem;
}

.quote-form .quote-phone-control > input,
.quote-form .quote-phone-control > input:focus {
    min-width: 0;
    padding-left: 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.quote-contact-row {
    align-items: start;
}

.quote-area-card__map {
    background-image: none;
}

.quote-area-card__map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-form .quantity-control input {
    width: 2.3rem;
    min-height: 2.75rem;
    padding: .2rem;
    text-align: center;
}

.quote-form .quantity-control button {
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.quote-upload {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    overflow-wrap: anywhere;
}

.quote-upload progress {
    width: 100%;
    accent-color: var(--color-blue);
}

.quote-upload__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.quote-upload button {
    min-height: 44px;
    padding: .5rem 1rem;
    cursor: pointer;
}

.upload-card:focus-within {
    outline: 3px solid var(--color-blue);
    outline-offset: 3px;
}

.quote-form button:disabled {
    opacity: .55;
    cursor: wait;
}

.quote-service-choice small {
    display: block;
    margin-top: .5rem;
    font-weight: 400;
}

.quote-form .size-custom-fields[hidden] {
    display: none;
}

.quote-submit-overlay {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(5, 26, 52, .72);
    opacity: 0;
    transition: opacity .24s ease;
}

.quote-submit-overlay.is-visible {
    opacity: 1;
}

.quote-submit-overlay[hidden] {
    display: none;
}

.quote-submit-overlay__panel {
    width: min(100%, 28rem);
    padding: 2rem;
    border-radius: 12px;
    color: var(--color-navy);
    background: #fff;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .28);
    text-align: center;
}

.quote-submit-overlay__panel::before {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 1rem;
    border: 3px solid #d6e4ee;
    border-top-color: var(--color-blue);
    border-radius: 50%;
    content: '';
    animation: fcl-quote-spin .8s linear infinite;
}

.quote-submit-overlay__panel p {
    margin: .4rem 0 1.25rem;
}

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

@media (prefers-reduced-motion: reduce) {
    .quote-submit-overlay, .quote-submit-overlay__panel::before {
        transition: none;
        animation: none;
    }
}

/* Normalize native Safari controls without replacing the accessible OS picker. */
.quote-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.quote-form select {
    box-sizing: border-box;
    height: 3.1rem;
    min-width: 0;
    line-height: 1.4;
}
.quote-form select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.65rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23072a5a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    background-size: 1rem;
}
.quote-form .quote-phone-control > input { height: calc(3.1rem - 2px); min-height: 0; }
.quote-form .quantity-control input { height: 2.75rem; }
.quote-form .quote-input-shell--select > select { padding-right: 4.25rem; }
/* Windows high contrast should retain a visible native disclosure control. */
@media (forced-colors: active) {
    .quote-form select { appearance: auto; background-image: none; }
}

/* City and optional postal code; province is fixed to BC on the server. */
.quote-form .quote-address-details { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.quote-form .quote-address-details__postal { grid-column: auto; }
@media (max-width: 44rem) {
    .quote-form .quote-address-details { grid-template-columns: 1fr; }
}
