/* Quote pop-up + floating quote bar. Self-contained — does not depend on Tailwind. */

.qp-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background-color: #1a202c;
    border-top: 2px solid #10B981;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.qp-bar__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    text-align: center;
}

.qp-bar__link,
.qp-bar__phone {
    pointer-events: auto;
}

.qp-bar__link {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.qp-bar__link:hover,
.qp-bar__link:focus {
    border-bottom-color: #10B981;
    color: #10B981;
}

.qp-bar__phone {
    color: #ffffff;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.qp-bar__phone strong {
    color: #10B981;
}

.qp-bar__phone:hover,
.qp-bar__phone:focus {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .qp-bar__inner {
        gap: 0.35rem;
        padding-top: 0.65rem;
        padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
    }
    .qp-bar__link,
    .qp-bar__phone {
        font-size: 0.85rem;
    }
}

/* Reserve room so page content and the existing floating contact button
   never sit underneath the bar. Height is measured at runtime because the
   bar wraps to a taller two-line layout on narrow screens. */
body.qp-bar-active {
    padding-bottom: calc(var(--qp-bar-height, 60px) + env(safe-area-inset-bottom, 0px)) !important;
}

/* So scrollIntoView()/anchor/focus scrolling never parks a mid-page element
   (e.g. a form's submit button) directly under the fixed bar. Set unconditionally —
   the --qp-bar-height custom property only exists once the bar script has run. */
html {
    scroll-padding-bottom: calc(var(--qp-bar-height, 0px) + env(safe-area-inset-bottom, 0px) + 16px);
}

body.qp-bar-active .floating-button {
    bottom: calc(var(--qp-bar-height, 60px) + env(safe-area-inset-bottom, 0px) + 0.75rem) !important;
}

/* Pop-up dialog */
.qp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.qp-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
}

.qp-panel {
    position: relative;
    width: 100%;
    max-width: 26rem;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.qp-panel__header {
    background-color: #1a202c;
    padding: 1.5rem 1.75rem 1.25rem 1.75rem;
    position: relative;
}

.qp-panel__eyebrow {
    margin: 0 0 0.25rem 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.qp-panel__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.4;
    color: #ffffff;
    padding-right: 1.5rem;
}

.qp-panel__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}

.qp-panel__close:hover,
.qp-panel__close:focus {
    color: #ffffff;
}

.qp-panel__body {
    padding: 1.5rem 1.75rem;
}

.qp-panel__body p {
    margin: 0 0 0.9rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1a202c;
}

.qp-panel__body p:last-of-type {
    margin-bottom: 1.5rem;
}

.qp-panel__body a {
    color: #1a202c;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.qp-panel__body a:hover,
.qp-panel__body a:focus {
    text-decoration: underline;
}

.qp-panel__actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.qp-panel__primary {
    display: block;
    text-align: center;
    background-color: #10B981;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
}

.qp-panel__primary:hover,
.qp-panel__primary:focus {
    background-color: #0e9c71;
}

.qp-panel__secondary {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: 1px solid #d1d5db;
    color: #4b5563;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.qp-panel__secondary:hover,
.qp-panel__secondary:focus {
    border-color: #9ca3af;
    color: #1a202c;
}

@media (min-width: 480px) {
    .qp-panel__actions {
        flex-direction: row;
    }
    .qp-panel__primary,
    .qp-panel__secondary {
        flex: 1;
    }
}
