:root {
    --gaq-accent: #ff6600; /* fallback, overridden inline via style attribute */
    --gaq-footer-h: 80px; /* fallback, overridden inline */
}

/* Fixed quote button (thinner) */
#gaq-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    min-width: 140px;
    height: 44px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--gaq-accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.35);
    transition: background .2s ease, transform .2s ease;
    z-index: 100000;
    display: grid;
    place-items: center;
}

#gaq-btn .gaq-label { display: inline; }
#gaq-btn .gaq-icon { display: none; }

/* Popup container anchored above the button */
.gaq-modal {
    position: fixed;
    bottom: 90px; /* moved up by 20px */
    right: 20px;
    left: auto;
    width: calc(100% - 40px);
    max-width: 336px; /* 20% narrower than previous 420px */
    z-index: 100001;
    pointer-events: none; /* clicks pass through when hidden */
    visibility: hidden;   /* ensure it doesn't block UI */
    font-family: inherit;
}

/* Enable interactions only when shown */
.gaq-modal.show {
    pointer-events: auto;
    visibility: visible;
}

/* Inner content with animation */
.gaq-modal-inner {
    background: #ffffff; /* ensure white background */
    border-radius: 12px;
    padding: 0; /* remove inset so footer can be full-bleed */
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto; /* allow vertical scroll if content overflows */
    max-height: calc(100vh - 180px); /* adapt to viewport height */
    transform: translateY(10px);
    opacity: 0;
    transition: transform .35s cubic-bezier(.2,.1,.1,1), opacity .35s ease;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Give the form area its spacing; keep footer full-bleed */
.gaq-form-wrapper {
    padding: 24px 42px 0 28px; /* preserve previous spacing for content */
    flex: 1 1 auto; /* fill available space above footer */
}

.gaq-modal.show .gaq-modal-inner {
    transform: translateY(0);
    opacity: 1;
}

/* Close button (X) */
#gaq-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    background: transparent;
    border: none;
    line-height: 1;
    color: #fff; /* black X */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gaq-footer-bar {
    display: flex;
    flex-direction: column; /* stack phone + logo */
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gaq-accent);
    border-radius: 0 0 12px 12px;
    margin: 0; /* full-bleed inside modal-inner */
    z-index: 100002;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    padding: 0; /* no inset padding so color covers entire bottom */
    width: 100%;
    min-height: var(--gaq-footer-h); /* slider-controlled height */
    align-self: stretch; /* ensure full width */
}

/* Ensure logo image scales and doesn't overflow */
.gaq-footer-logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

.gaq-footer-bar .call-label,
.gaq-footer-bar .call-number a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
    font-size: 14px; /* ensure both are same tiny size */
}



/* Gravity Form submit button styling */
.gform_wrapper .gform_footer .gform_button {
    background: var(--gaq-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2) !important;
    transition: transform .15s ease;
}
.gform_wrapper .gform_footer .gform_button:hover {
    transform: translateY(-1px);
}

/* Ensure Gravity Forms fields fit within the modal width */
.gaq-modal-inner .gform_wrapper .gform_fields,
.gaq-modal-inner .gform_wrapper .gfield,
.gaq-modal-inner .gform_wrapper .ginput_container {
    width: 100%;
    max-width: 100%;
}
.gaq-modal-inner .gform_wrapper input,
.gaq-modal-inner .gform_wrapper select,
.gaq-modal-inner .gform_wrapper textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gaq-modal {
    right: 12px;
    left: auto;
    bottom: 90px; /* moved up by 20px */
        max-width: 90%;
    }
    #gaq-btn {
    right: 16px;
    left: auto;
        bottom: 16px;
        min-width: 130px;
        height: 42px;
        font-size: 16px;
    }
    /* Make inner container scroll within viewport height */
    .gaq-modal-inner {
        max-height: calc(100vh - 180px); /* account for button & margins */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

