/* ==========================================================================
   Quick connect — floating buttons, callback / enquiry modal, WhatsApp modal.
   Markup + behaviour: component/quick-connect.php.

   Rebuilt on the studio's own tokens from style.css — navy ink, brass gold,
   bone — and its form conventions: underline fields, small uppercase labels,
   .btn--gold actions. The stylesheet that shipped with the Synobiz widget
   (teal gradients, rounded dark cards, theme-specific selectors) is not used.
   ========================================================================== */

/* ---------- Floating buttons ----------------------------------------------- */
/* Same corner, size and colours as the two plain links they replace. */
.qc-fabs {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 70;
    display: grid;
    gap: 12px;
}

.qc-fab {
    position: relative;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .3s var(--ease), background-color .3s var(--ease);
}

.qc-fab .ico {
    width: 22px;
    height: 22px;
}

.qc-fab--wa {
    background: #25a366;
}

.qc-fab--call {
    background: var(--ink);
}

.qc-fab:hover {
    transform: scale(1.08);
}

.qc-fab--call:hover {
    background: var(--gold);
}

.qc-fab:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* Label on hover / keyboard focus — desktop only (hidden on phones below). */
.qc-fab[data-label]::after {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translate(6px, -50%);
    padding: 8px 12px;
    white-space: nowrap;
    background: var(--ink);
    color: #fff;
    font: 500 .62rem/1 var(--sans);
    letter-spacing: .16em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.qc-fab:hover::after,
.qc-fab:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

/* A slow gold ring on the callback button — the primary action. */
.qc-fab--call::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--gold);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

@keyframes qc-ring {
    0% {
        transform: scale(1);
        opacity: .75;
    }

    70%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ---------- Overlay + modal ------------------------------------------------ */
.qc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(10, 21, 41, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* The script opens and closes purely with the hidden attribute. A display
   rule above would otherwise outrank the browser's own [hidden] style. */
.qc-overlay[hidden],
.qc-form[hidden],
.qc-pane[hidden],
.qc-alert[hidden],
.qc-title [hidden] {
    display: none;
}

.qc-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: calc(100svh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bone);
    color: var(--ink);
    border-top: 3px solid var(--gold);
    box-shadow: 0 40px 90px -30px rgba(10, 21, 41, .6);
}

@keyframes qc-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes qc-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes qc-sheet {
    from {
        transform: translateY(100%);
    }

    to {
        transform: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .qc-fab--call::before {
        animation: qc-ring 2.8s ease-out infinite;
    }

    .qc-overlay:not([hidden]) {
        animation: qc-fade .3s var(--ease) both;
    }

    .qc-overlay:not([hidden]) .qc-modal {
        animation: qc-rise .45s var(--ease) both;
    }
}

.qc-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    transition: color .3s, border-color .3s;
}

.qc-close:hover,
.qc-close:focus-visible {
    color: var(--gold);
    border-color: var(--gold);
    outline: 0;
}

/* ---------- Head + tabs ---------------------------------------------------- */
.qc-head {
    padding: 34px 64px 4px 32px;
}

.qc-head .eyebrow {
    margin-bottom: 14px;
}

.qc-title {
    font-size: clamp(1.75rem, 4vw, 2.15rem);
    line-height: 1.1;
}

.qc-title em {
    display: block;
}

.qc-tabs {
    display: flex;
    gap: 26px;
    margin: 22px 32px 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}

.qc-tabs::-webkit-scrollbar {
    display: none;
}

.qc-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 12px 0 13px;
    background: none;
    border: 0;
    color: var(--muted);
    font: 500 .66rem/1.2 var(--sans);
    letter-spacing: .16em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .3s;
}

.qc-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}

.qc-tab:hover,
.qc-tab.is-active {
    color: var(--ink);
}

.qc-tab.is-active::after {
    transform: scaleX(1);
}

.qc-tab:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- Body + fields -------------------------------------------------- */
.qc-body {
    padding: 24px 32px 28px;
}

.qc-form,
.qc-pane {
    display: grid;
    gap: 18px;
}

.qc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.qc-field label {
    display: block;
    margin-bottom: 6px;
    font-size: .64rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
}

.qc-field label small {
    font-size: .72rem;
    letter-spacing: 0;
    text-transform: none;
}

.qc-input,
.qc-cc {
    width: 100%;
    padding: 10px 0;
    background-color: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font: 300 1rem/1.4 var(--sans);
    color: var(--ink);
    transition: border-color .3s;
}

.qc-input:focus,
.qc-cc:focus {
    outline: 0;
    border-color: var(--gold);
}

.qc-input::placeholder {
    color: rgba(15, 31, 61, .38);
}

.qc-input.is-invalid {
    border-color: #b3413b;
}

textarea.qc-input {
    min-height: 88px;
    resize: vertical;
}

/* Native arrow off, a navy chevron on — matches the underline field style. */
select.qc-input,
.qc-cc {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 22px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F1F3D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    background-size: 14px;
}

.qc-cc {
    font-weight: 400;
}

.qc-phone {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    align-items: end;
}

/* Honeypot — present for bots, invisible to people and screen readers. */
.qc-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.qc-form .btn,
.qc-pane .btn {
    margin-top: 4px;
}

.qc-note {
    margin: 0;
    font-size: .8rem;
    line-height: 1.55;
    color: var(--muted);
    text-align: center;
}

.qc-form .form__legal {
    margin: 0;
    font-size: 11.5px;
    text-align: center;
}

.qc-body > .qc-note {
    margin-top: 16px;
}

/* ---------- Alerts ---------------------------------------------------------- */
.qc-alert {
    margin-top: 16px;
    padding: 14px 16px;
    border-left: 3px solid #b3413b;
    background: var(--sand);
    font-size: .9rem;
    line-height: 1.55;
}

.qc-alert--ok {
    border-color: var(--gold);
}

.qc-alert p {
    margin: 8px 0 0;
}

.qc-alert a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Foot ------------------------------------------------------------ */
.qc-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    padding: 16px 32px;
    border-top: 1px solid var(--line);
    background: var(--sand);
    font-size: .62rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
}

.qc-foot a {
    color: var(--ink);
}

.qc-foot a:hover {
    color: var(--gold);
}

/* ---------- Phones: a bottom sheet ------------------------------------------ */
@media (max-width: 560px) {
    .qc-fabs {
        right: 16px;
        bottom: 16px;
        gap: 10px;
    }

    .qc-fab {
        width: 48px;
        height: 48px;
    }

    .qc-fab[data-label]::after {
        display: none;
    }

    .qc-overlay {
        place-items: end stretch;
        padding: 0;
    }

    .qc-modal {
        max-width: none;
        max-height: 92svh;
    }

    .qc-head {
        padding: 28px 60px 4px 22px;
    }

    .qc-tabs {
        margin: 18px 22px 0;
        gap: 20px;
    }

    .qc-body {
        padding: 20px 22px 24px;
    }

    .qc-foot {
        padding: 14px 22px;
    }

    .qc-phone {
        grid-template-columns: 90px 1fr;
    }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 560px) {
    .qc-overlay:not([hidden]) .qc-modal {
        animation-name: qc-sheet;
    }
}
