/* =================================================================
   Get a Quote & WhatsApp Buttons — Frontend Styles  v1.0.0
   ================================================================= */

/* ── Custom properties ────────────────────────────────────────── */
:root {
    --gaq-font:          inherit;
    --gaq-shadow-sm:     0 2px 8px rgba(0,0,0,.10);
    --gaq-shadow-md:     0 4px 20px rgba(0,0,0,.14);
    --gaq-shadow-lg:     0 8px 40px rgba(0,0,0,.20);
    --gaq-transition:    .22s cubic-bezier(.4,0,.2,1);
    --gaq-radius-modal:  16px;
}

/* ── Button wrapper ───────────────────────────────────────────── */
.gaq-wrap { display: inline-block; width: auto; }

.gaq-btn-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Stacked layout */
.gaq-layout-stacked .gaq-btn-rail {
    flex-direction: column;
    align-items: flex-start;
}

/* ── Base button ──────────────────────────────────────────────── */
.gaq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family:    var(--gaq-font);
    font-weight:    700;
    letter-spacing: .02em;
    text-decoration: none;
    white-space:    nowrap;
    transition:
        background var(--gaq-transition),
        transform   var(--gaq-transition),
        box-shadow  var(--gaq-transition),
        filter      var(--gaq-transition);
    user-select: none;
    position: relative;
    overflow: hidden;
    line-height: 1;
    vertical-align: middle;
}

/* Ripple pseudo */
.gaq-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.18);
    opacity: 0;
    transition: opacity .2s;
    border-radius: inherit;
}
.gaq-btn:hover::after  { opacity: 1; }
.gaq-btn:active        { transform: scale(.97); }

/* ── Sizes ────────────────────────────────────────────────────── */
.gaq-size-sm .gaq-btn { font-size: 13px; padding: 9px  18px; }
.gaq-size-md .gaq-btn { font-size: 15px; padding: 12px 24px; }
.gaq-size-lg .gaq-btn { font-size: 17px; padding: 15px 32px; }

/* ── Quote button ─────────────────────────────────────────────── */
.gaq-btn--quote {
    background: var(--gaq-color, #0e6634);
    color: #fff;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--gaq-color, #0e6634) 40%, transparent);
}
.gaq-btn--quote:hover {
    background: color-mix(in srgb, var(--gaq-color, #0e6634) 85%, #000 15%);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--gaq-color, #0e6634) 50%, transparent);
    transform: translateY(-2px);
    color: #fff;
}

/* ── WhatsApp button ──────────────────────────────────────────── */
.gaq-btn--wa {
    background: var(--gaq-color, #25d366);
    color: #fff;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--gaq-color, #25d366) 40%, transparent);
}
.gaq-btn--wa:hover {
    background: color-mix(in srgb, var(--gaq-color, #25d366) 85%, #000 15%);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--gaq-color, #25d366) 50%, transparent);
    transform: translateY(-2px);
    color: #fff;
}

/* ── Icon ─────────────────────────────────────────────────────── */
.gaq-icon {
    width:  1.1em;
    height: 1.1em;
    flex-shrink: 0;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
    transition: transform var(--gaq-transition);
}
.gaq-btn:hover .gaq-icon { transform: scale(1.15); }

/* ═══════════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════════ */

.gaq-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999990;
    background: rgba(10,10,20,.58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    /* animation states */
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}
.gaq-modal-overlay.gaq-is-open {
    opacity: 1;
    visibility: visible;
}
/* hidden attribute fallback */
.gaq-modal-overlay[hidden] { display: none !important; }

/* ── Modal box ─────────────────────────────────────────────────── */
.gaq-modal {
    background: #fff;
    border-radius: var(--gaq-radius-modal);
    width: 100%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: var(--gaq-shadow-lg);
    transform: translateY(24px) scale(.97);
    transition: transform .3s cubic-bezier(.34,1.46,.64,1);
    display: flex;
    flex-direction: column;
}
.gaq-modal-overlay.gaq-is-open .gaq-modal {
    transform: translateY(0) scale(1);
}

/* ── Modal header ──────────────────────────────────────────────── */
.gaq-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #ebebeb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: var(--gaq-radius-modal) var(--gaq-radius-modal) 0 0;
}

.gaq-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #111;
    line-height: 1.25;
}

/* Coloured left border accent on header */
.gaq-modal__header::before {
    content: '';
    display: block;
    width: 4px;
    height: 28px;
    border-radius: 4px;
    background: #0e6634;
    flex-shrink: 0;
    order: -1;
}

.gaq-modal__close {
    background: #f2f2f2;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    flex-shrink: 0;
    transition: background var(--gaq-transition), color var(--gaq-transition);
    padding: 0;
    line-height: 1;
}
.gaq-modal__close:hover { background: #e0e0e0; color: #111; }
.gaq-modal__close svg   { pointer-events: none; }

/* ── Product label strip ───────────────────────────────────────── */
.gaq-modal__product-label {
    margin: 0;
    padding: 10px 24px;
    background: #f6fdf8;
    border-bottom: 1px solid #e4f0ea;
    font-size: 13.5px;
    color: #2d6a45;
    font-weight: 600;
}
.gaq-modal__product-label[hidden] { display: none; }

/* ── Modal body ────────────────────────────────────────────────── */
.gaq-modal__body {
    padding: 26px 24px 28px;
    flex: 1;
}

/* ── Loading state ─────────────────────────────────────────────── */
.gaq-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 36px 0;
    color: #999;
    font-size: 14px;
}

@keyframes gaq-spin {
    to { transform: rotate(360deg); }
}
.gaq-spinner {
    display: block;
    width: 34px;
    height: 34px;
    border: 3px solid #e8e8e8;
    border-top-color: #0e6634;
    border-radius: 50%;
    animation: gaq-spin .75s linear infinite;
}

/* ── CF7 form inside modal ─────────────────────────────────────── */
.gaq-modal__body .wpcf7 p { margin-bottom: 14px; }

.gaq-modal__body .wpcf7 input[type="text"],
.gaq-modal__body .wpcf7 input[type="email"],
.gaq-modal__body .wpcf7 input[type="tel"],
.gaq-modal__body .wpcf7 input[type="url"],
.gaq-modal__body .wpcf7 input[type="number"],
.gaq-modal__body .wpcf7 select,
.gaq-modal__body .wpcf7 textarea {
    width: 100%;
    border: 1.5px solid #dde4e1;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14.5px;
    line-height: 1.5;
    color: #222;
    background: #fafafa;
    transition: border-color var(--gaq-transition), box-shadow var(--gaq-transition), background var(--gaq-transition);
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
}
.gaq-modal__body .wpcf7 input:focus,
.gaq-modal__body .wpcf7 textarea:focus,
.gaq-modal__body .wpcf7 select:focus {
    border-color: #0e6634;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14,102,52,.12);
}

.gaq-modal__body .wpcf7 textarea { min-height: 100px; resize: vertical; }

.gaq-modal__body .wpcf7 label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

.gaq-modal__body .wpcf7 input[type="submit"] {
    background: #0e6634;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 32px;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: background var(--gaq-transition), transform var(--gaq-transition);
    font-family: inherit;
    letter-spacing: .03em;
    margin-top: 6px;
}
.gaq-modal__body .wpcf7 input[type="submit"]:hover {
    background: #0a4f28;
    transform: translateY(-1px);
}
.gaq-modal__body .wpcf7 input[type="submit"]:active { transform: none; }

.gaq-modal__body .wpcf7-response-output {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13.5px;
    margin-top: 14px !important;
}

/* ── Scrollbar inside modal ────────────────────────────────────── */
.gaq-modal::-webkit-scrollbar       { width: 5px; }
.gaq-modal::-webkit-scrollbar-track { background: transparent; }
.gaq-modal::-webkit-scrollbar-thumb { background: #ddd; border-radius: 5px; }

/* ── Mobile tweaks ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .gaq-modal-overlay { padding: 0; align-items: flex-end; }
    .gaq-modal {
        border-radius: var(--gaq-radius-modal) var(--gaq-radius-modal) 0 0;
        max-height: 92vh;
    }
    .gaq-layout-inline .gaq-btn-rail { flex-direction: column; width: 100%; }
    .gaq-layout-inline .gaq-btn      { width: 100%; }
}

/* ── No-JS fallback: keep overlay truly hidden ────────────────── */
.gaq-modal-overlay[hidden] { display: none !important; }
