/* =========================================================
   Ineris - Web Caller (połączenie głosowe przez przeglądarkę)
   Lewa krawędź ekranu. Uruchamia natywny Voice Zendesk
   przez zE('messenger:open','voice', line_id).
   Kolory Ineris żółto-pomarańczowe.
   ========================================================= */

.ineris-wc {
    --wc-orange: #f97316;
    --wc-orange-dark: #ea580c;
    --wc-amber: #fbbf24;
    --wc-ink: #1f2937;
    --wc-muted: #6b7280;
    --wc-line: #f1e4d3;
    --wc-font: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: fixed;
    z-index: 2147482900;
    top: 0;
    left: 0;
    font-family: var(--wc-font);
}
.ineris-wc *, .ineris-wc *::before, .ineris-wc *::after { box-sizing: border-box; }

/* ---------- Zaczepka (lewa krawędź) ---------- */
.ineris-wc__tab {
    position: fixed;
    left: 0;
    top: calc(50% + 130px);
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--wc-orange-dark) 0%, var(--wc-orange) 45%, var(--wc-amber) 100%);
    border-radius: 0 16px 16px 0;
    box-shadow: 8px 10px 26px -8px rgba(234, 88, 12, .55);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .3px;
    transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, padding .3s ease;
    animation: wcTabIn .6s cubic-bezier(.16,1,.3,1) .55s both;
}
.ineris-wc__tab:hover {
    transform: translateY(-50%) translateX(4px);
    box-shadow: 12px 14px 34px -8px rgba(234, 88, 12, .7);
}
.ineris-wc__tab i {
    writing-mode: horizontal-tb;
    font-size: 18px;
    transform: rotate(180deg);
    animation: wcRing 2.4s ease-in-out infinite;
}
.ineris-wc__tab-ping {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    animation: wcPing 1.8s ease-out infinite;
}
.ineris-wc.is-open .ineris-wc__tab {
    transform: translateY(-50%) translateX(-120px);
    opacity: 0;
    pointer-events: none;
}

/* ---------- Overlay ---------- */
.ineris-wc__overlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 16, 8, .38);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}
.ineris-wc.is-open .ineris-wc__overlay { opacity: 1; visibility: visible; }

/* ---------- Panel (wysuwany z lewej) ---------- */
.ineris-wc__panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 390px;
    max-width: 92vw;
    background: #fff;
    box-shadow: 24px 0 60px -12px rgba(234, 88, 12, .45);
    transform: translateX(-105%);
    transition: transform .48s cubic-bezier(.16,1,.3,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.ineris-wc.is-open .ineris-wc__panel { transform: translateX(0); }

.ineris-wc__header {
    position: relative;
    padding: 30px 26px 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--wc-orange-dark) 0%, var(--wc-orange) 45%, var(--wc-amber) 100%);
    overflow: hidden;
}
.ineris-wc__header::after {
    content: "";
    position: absolute;
    left: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255,255,255,.28), transparent 70%);
    border-radius: 50%;
}
.ineris-wc__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
    z-index: 2;
}
.ineris-wc__close:hover { background: rgba(255, 255, 255, .32); transform: rotate(90deg); }
.ineris-wc__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}
.ineris-wc__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: wcPing 1.8s ease-out infinite; }
.ineris-wc__title { margin: 0 0 6px; font-size: 24px; font-weight: 800; line-height: 1.2; position: relative; z-index: 2; }
.ineris-wc__subtitle { margin: 0; font-size: 14.5px; opacity: .95; line-height: 1.45; position: relative; z-index: 2; }

.ineris-wc__body { padding: 26px; flex: 1; display: flex; flex-direction: column; }

.ineris-wc__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0 22px;
}
.ineris-wc__hero-ic {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #fff;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--wc-amber), var(--wc-orange) 60%, var(--wc-orange-dark));
    box-shadow: 0 14px 30px -10px rgba(234, 88, 12, .6);
    position: relative;
}
.ineris-wc__hero-ic::before,
.ineris-wc__hero-ic::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(249, 115, 22, .5);
    animation: wcWave 2.2s ease-out infinite;
}
.ineris-wc__hero-ic::after { animation-delay: 1.1s; }
.ineris-wc__hero h4 { margin: 0 0 8px; font-size: 19px; font-weight: 800; color: var(--wc-ink); }
.ineris-wc__hero p { margin: 0; font-size: 14px; color: var(--wc-muted); line-height: 1.55; max-width: 300px; }

.ineris-wc__features { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 22px; }
.ineris-wc__feature { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--wc-ink); }
.ineris-wc__feature i {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff7ed; color: var(--wc-orange); font-size: 14px;
}

.ineris-wc__call {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 16.5px;
    font-weight: 800;
    font-family: var(--wc-font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    background: linear-gradient(135deg, var(--wc-amber) 0%, var(--wc-orange) 55%, var(--wc-orange-dark) 100%);
    box-shadow: 0 12px 26px -8px rgba(234, 88, 12, .6);
    transition: transform .25s ease, box-shadow .25s ease;
    margin-top: auto;
}
.ineris-wc__call:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(234, 88, 12, .75); }
.ineris-wc__call i { font-size: 18px; animation: wcRing 2.4s ease-in-out infinite; }

.ineris-wc__note { margin: 14px 0 0; font-size: 11.5px; color: var(--wc-muted); text-align: center; line-height: 1.5; }
.ineris-wc__fallback { margin-top: 12px; text-align: center; font-size: 13px; color: var(--wc-muted); }
.ineris-wc__fallback a { color: var(--wc-orange-dark); font-weight: 700; text-decoration: none; }
.ineris-wc__fallback a:hover { text-decoration: underline; }

@keyframes wcTabIn { from { transform: translateY(-50%) translateX(-120px); opacity: 0; } to { transform: translateY(-50%) translateX(0); opacity: 1; } }
@keyframes wcRing {
    0%, 65%, 100% { transform: rotate(0); }
    70% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); }
    80% { transform: rotate(10deg); } 85% { transform: rotate(-10deg); } 90% { transform: rotate(0); }
}
.ineris-wc__tab i { /* keep base rotation for left tab icon */ }
@keyframes wcPing { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes wcWave { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }

@media (max-width: 480px) {
    .ineris-wc__panel { width: 100%; max-width: 100%; }
    .ineris-wc__tab { font-size: 13px; padding: 13px 11px; top: calc(50% + 120px); }
}
