/* =========================================================
   HIZLI İLETİŞİM – SOL ALT KÖŞE YÜZEN BUTON
   Tüm sınıf ve keyframe adları "hzi-" öneklidir.
   ========================================================= */

.hzi-widget {
    position: fixed;
    left: 22px;
    bottom: 22px;
    left: max(22px, env(safe-area-inset-left));
    bottom: max(22px, env(safe-area-inset-bottom));
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    font-family: var(--font-main, 'Jost', sans-serif);
}

/* --- ANA BUTON --- */
.hzi-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 58px;
    padding: 0 24px 0 20px;
    background: var(--c-orange, #FF6B00);
    color: #FFFFFF;
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(255, 107, 0, 0.4);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.hzi-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(255, 107, 0, 0.5);
}

.hzi-toggle:focus-visible {
    outline: 3px solid rgba(10, 43, 94, 0.5);
    outline-offset: 3px;
}

.hzi-toggle i {
    font-size: 1.3rem;
    line-height: 1;
}

.hzi-toggle .hzi-ico-close { display: none; }

/* Nabız halkası */
.hzi-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50px;
    border: 2px solid var(--c-orange, #FF6B00);
    opacity: 0;
    pointer-events: none;
    animation: hziPulse 2.6s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes hziPulse {
    0%   { transform: scale(1);    opacity: 0.7; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* --- AÇIK DURUM --- */
.hzi-widget.hzi-open .hzi-toggle {
    background: var(--c-blue, #0A2B5E);
    box-shadow: 0 10px 28px rgba(10, 43, 94, 0.35);
}

.hzi-widget.hzi-open .hzi-ico-open  { display: none; }
.hzi-widget.hzi-open .hzi-ico-close { display: inline-block; }
.hzi-widget.hzi-open .hzi-pulse     { animation: none; opacity: 0; }

/* --- AÇILIR MENÜ --- */
.hzi-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.96);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.hzi-widget.hzi-open .hzi-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hzi-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 230px;
    padding: 10px 22px 10px 10px;
    background: #FFFFFF;
    color: #0A2B5E;
    text-decoration: none;
    border: 1px solid #E2E8F0;
    border-radius: 50px;
    box-shadow: 0 12px 30px rgba(10, 43, 94, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hzi-item:hover {
    transform: translateX(5px);
    box-shadow: 0 16px 36px rgba(10, 43, 94, 0.2);
    color: #0A2B5E;
}

.hzi-item:focus-visible {
    outline: 3px solid rgba(255, 107, 0, 0.55);
    outline-offset: 3px;
}

.hzi-item-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.hzi-whatsapp .hzi-item-icon { background: #25D366; box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4); }
.hzi-call .hzi-item-icon     { background: var(--c-blue, #0A2B5E); box-shadow: 0 6px 16px rgba(10, 43, 94, 0.3); }

.hzi-whatsapp:hover { border-color: #25D366; }
.hzi-call:hover     { border-color: var(--c-blue, #0A2B5E); }

.hzi-item-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.hzi-item-text strong {
    font-size: 0.98rem;
    font-weight: 800;
}

.hzi-item-text small {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748B;
}

/* Menü açılırken seçenekler sırayla gelsin */
.hzi-widget.hzi-open .hzi-item {
    animation: hziItemIn 0.35s ease both;
}
.hzi-widget.hzi-open .hzi-item:nth-child(2) { animation-delay: 0.06s; }

@keyframes hziItemIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- MOBİL --- */
@media (max-width: 680px) {
    .hzi-widget {
        left: 14px;
        bottom: 14px;
        left: max(14px, env(safe-area-inset-left));
        bottom: max(14px, env(safe-area-inset-bottom));
    }

    /* Mobilde ana buton yuvarlak ikon olur */
    .hzi-toggle {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .hzi-toggle-label { display: none; }
    .hzi-pulse { border-radius: 50%; }

    .hzi-item { min-width: 210px; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    .hzi-pulse { animation: none; }
    .hzi-menu, .hzi-toggle, .hzi-item { transition: none; }
    .hzi-widget.hzi-open .hzi-item { animation: none; }
}