/* =============================================================
   WebRTC — Floating button + Global Call Modal
   HEDG brand: dark navy bg, teal accent, orange CTA
   ============================================================= */

/* ── Overlay ─────────────────────────────────────────────────── */
.hedg-call-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.hedg-call-overlay.is-open { display: flex; }
body.hedg-call-open { overflow: hidden; }

/* ── Modal card ──────────────────────────────────────────────── */
.hedg-call-modal {
    position: relative;
    background: #0e1f31;
    border: 1px solid rgba(93, 190, 168, .18);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 48px 36px 40px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .55);
    animation: hedgModalIn .22s ease;
}
@keyframes hedgModalIn {
    from { opacity: 0; transform: scale(.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.hedg-call-modal h2 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 28px;
}
.hedg-call-modal p {
    color: rgba(255,255,255,.72);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 24px;
}

/* ── Close button ────────────────────────────────────────────── */
.hedg-call-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .15s;
}
.hedg-call-close:hover { color: #fff; }

/* ── Step: Email ─────────────────────────────────────────────── */
.hedg-call-email-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hedg-call-email-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,.07);
    border: 1.5px solid rgba(93, 190, 168, .25);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.hedg-call-email-input::placeholder { color: rgba(255,255,255,.4); }
.hedg-call-email-input:focus { border-color: #5dbea8; }
.hedg-call-submit-btn {
    padding: 14px;
    background: #ff7522;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.hedg-call-submit-btn:hover  { background: #e8671d; }
.hedg-call-submit-btn:active { transform: scale(.98); }

/* ── Step: Connecting ────────────────────────────────────────── */
.hedg-call-connecting-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(93,190,168,.12);
    border: 2px solid rgba(93,190,168,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: hedgPulse 1.8s ease-in-out infinite;
}
.hedg-call-connecting-icon svg { color: #5dbea8; }
@keyframes hedgPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(93,190,168,.3); }
    50%      { box-shadow: 0 0 0 14px rgba(93,190,168,.0); }
}

/* ── Step: Language ──────────────────────────────────────────── */
.hedg-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.hedg-lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 14px;
    color: #fff;
    font-size: .9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}
.hedg-lang-btn:hover {
    background: rgba(93,190,168,.15);
    border-color: rgba(93,190,168,.5);
}
.hedg-lang-flag {
    font-size: 2rem;
    line-height: 1;
}

/* ── Step: In-call ───────────────────────────────────────────── */
.hedg-timer-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #0b1622;
    border-radius: 999px;
    padding: 14px 22px;
    margin-bottom: 28px;
}
.hedg-timer-icon {
    width: 36px;
    height: 36px;
    background: rgba(93,190,168,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #5dbea8;
}
#hedgCallTimer {
    font-size: 1.6rem;
    font-weight: 700;
    color: #5dbea8;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
}
.hedg-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
}
.hedg-waveform span {
    display: block;
    width: 3px;
    height: 16px;
    background: rgba(93,190,168,.5);
    border-radius: 2px;
    animation: hedgWave 1.2s ease-in-out infinite;
}
.hedg-waveform span:nth-child(1) { animation-delay: 0s;    height: 8px; }
.hedg-waveform span:nth-child(2) { animation-delay: .15s;  height: 14px; }
.hedg-waveform span:nth-child(3) { animation-delay: .3s;   height: 20px; }
.hedg-waveform span:nth-child(4) { animation-delay: .45s;  height: 12px; }
.hedg-waveform span:nth-child(5) { animation-delay: .6s;   height: 18px; }
.hedg-waveform span:nth-child(6) { animation-delay: .75s;  height: 8px; }
@keyframes hedgWave {
    0%,100% { transform: scaleY(1); opacity: .5; }
    50%      { transform: scaleY(1.8); opacity: 1; }
}

/* ── Hangup button (shared) ──────────────────────────────────── */
.hedg-hangup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #d72b2b;
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s;
}
.hedg-hangup-btn:hover { background: #b82222; }
.hedg-hangup-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Step: Ended ─────────────────────────────────────────────── */
.hedg-call-ended-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(93,190,168,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #5dbea8;
}
.hedg-call-ended-close {
    padding: 12px 32px;
    background: none;
    border: 1.5px solid rgba(255,255,255,.25);
    border-radius: 999px;
    color: rgba(255,255,255,.8);
    font-size: .95rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .18s, color .18s;
}
.hedg-call-ended-close:hover { border-color: #fff; color: #fff; }

/* ── Floating contact widget ─────────────────────────────────── */
.hedg-cw {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hedg-cw-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,.22);
    transition: transform .18s ease, box-shadow .18s ease;
    flex-shrink: 0;
}
.hedg-cw-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.hedg-cw-btn:hover { transform: scale(1.1); box-shadow: 0 5px 16px rgba(0,0,0,.3); }
.hedg-cw-btn:active { transform: scale(.94); }

/* Colors matching reference */
.hedg-cw-email { background: #8b7d6b; }
.hedg-cw-wa    { background: #2dba4e; }
.hedg-cw-tg    { background: #28b8d5; }
.hedg-cw-call  { background: #2b7fdb; box-shadow: 0 3px 12px rgba(43,127,219,.4); }
.hedg-cw-call:hover { box-shadow: 0 5px 18px rgba(43,127,219,.55); }

@media (max-width: 480px) {
    .hedg-call-modal { padding: 40px 22px 32px; border-radius: 20px; }
    .hedg-cw  { bottom: 18px; right: 14px; gap: 8px; }
    .hedg-cw-btn { width: 40px; height: 40px; }
    .hedg-cw-btn svg { width: 18px; height: 18px; }
}
