/* ═══════════════════════════════════════════════════════════
   Elope Asheville Contact Button
   ═══════════════════════════════════════════════════════════ */

/* ── Wrapper (fixed bottom-right) ───────────────────────── */
#ea-cb-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    /* Color token set via JS from WP settings */
    --ea-cb-color: #E8705A;
}

/* ── Main trigger button ─────────────────────────────────── */
#ea-cb-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    background: var(--ea-cb-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    position: relative;
    letter-spacing: 0.01em;
}

#ea-cb-main:hover,
#ea-cb-main:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.32);
    outline: none;
}

/* Pulse ring — eye-catching but never hides the button */
#ea-cb-main::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50px;
    border: 3px solid var(--ea-cb-color);
    opacity: 0;
    animation: ea-cb-pulse 2.8s ease-out infinite;
    pointer-events: none;
}

@keyframes ea-cb-pulse {
    0%   { opacity: 0.75; transform: scale(1);    }
    65%  { opacity: 0;    transform: scale(1.18); }
    100% { opacity: 0;    transform: scale(1.18); }
}

/* ── Sub-option menu ─────────────────────────────────────── */
#ea-cb-options {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    /* Animate open/close */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.22s ease;
    pointer-events: none;
}

#ea-cb-options.ea-cb-open {
    max-height: 200px;
    opacity: 1;
    pointer-events: auto;
}

/* Individual option buttons */
.ea-cb-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    background: #fff;
    color: #222;
    border: 2px solid var(--ea-cb-color);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.ea-cb-option:hover,
.ea-cb-option:focus-visible {
    background: var(--ea-cb-color);
    color: #fff;
    transform: translateX(-4px);
    outline: none;
}

.ea-cb-icon {
    font-size: 16px;
    line-height: 1;
}

/* ── Modal overlay ───────────────────────────────────────── */
#ea-cb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999998;
    cursor: pointer;
}

/* ── Modal dialog ────────────────────────────────────────── */
#ea-cb-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    background: #fff;
    border-radius: 14px;
    padding: 36px 32px 32px;
    max-width: 560px;
    width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
}

#ea-cb-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
    transition: color 0.15s;
}

#ea-cb-modal-close:hover {
    color: #222;
}

/* Hidden utility — used by WP's [hidden] attribute */
#ea-cb-modal[hidden],
#ea-cb-modal-overlay[hidden] {
    display: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    #ea-cb-wrap {
        bottom: 16px;
        right: 16px;
    }

    #ea-cb-main {
        padding: 11px 16px;
        font-size: 14px;
    }

    .ea-cb-option {
        padding: 9px 14px;
        font-size: 13px;
    }

    #ea-cb-modal {
        padding: 28px 20px 24px;
    }
}
