/* HazırSoft — Profesyonel canlı destek widget (sol alt) */
.hs-lc {
    --hs-lc-accent: #0ea5e9;
    --hs-lc-deep: #0284c7;
    --hs-lc-ink: #0f172a;
    --hs-lc-muted: #64748b;
    --hs-lc-line: #e2e8f0;
    --hs-lc-soft: #f0f9ff;
    font-family: inherit;
}

/* ---- FAB ---- */
.hs-lc-fab {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #38bdf8 0%, #0ea5e9 45%, #0284c7 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow:
        0 12px 28px rgba(14, 165, 233, 0.42),
        0 0 0 1px rgba(255,255,255,.15) inset;
    transition: transform .2s ease, box-shadow .2s ease;
}
.hs-lc-fab:hover {
    transform: scale(1.06) translateY(-1px);
    box-shadow: 0 16px 36px rgba(14, 165, 233, 0.5);
}
.hs-lc-fab.hs-lc-fab--nudge {
    animation: hsLcFabNudge .55s ease;
}
@keyframes hsLcFabNudge {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px) rotate(-4deg); }
    40% { transform: translateX(4px) rotate(4deg); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}
.hs-lc-fab:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.45);
    outline-offset: 3px;
}
.hs-lc-fab-icon { width: 30px; height: 30px; display: block; position: relative; z-index: 1; }
.hs-lc-fab-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(14, 165, 233, 0.5);
    animation: hsLcPulse 2.2s infinite;
    pointer-events: none;
}
@keyframes hsLcPulse {
    0% { transform: scale(1); opacity: .7; }
    100% { transform: scale(1.55); opacity: 0; }
}
.hs-lc-fab-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    z-index: 2;
    box-shadow: 0 0 0 0 rgba(34,197,94,.45);
    animation: hsLcDot 2s infinite;
}
/* Okunmamış mesaj sayısı (panel kapalıyken) */
.hs-lc-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    z-index: 3;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    pointer-events: none;
    animation: hsLcBadgePop .25s ease;
}
.hs-lc-fab-badge[hidden] { display: none !important; }
.hs-lc-fab-badge.is-pulse {
    animation: hsLcBadgePop .25s ease, hsLcBadgePulse 1.2s ease 1;
}
@keyframes hsLcBadgePop {
    0% { transform: scale(.5); }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes hsLcBadgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
/* Badge varken yeşil nokta gizlensin */
.hs-lc.has-unread .hs-lc-fab-dot { opacity: 0; }
@keyframes hsLcDot {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
    70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.hs-lc-fab-tip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--hs-lc-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    box-shadow: 0 6px 16px rgba(15,23,42,.2);
}
.hs-lc-fab-tip::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--hs-lc-ink);
}
.hs-lc-fab:hover .hs-lc-fab-tip { opacity: 1; }
.hs-lc.is-open .hs-lc-fab-tip { display: none; }

/* ---- Panel ---- */
.hs-lc-panel {
    position: fixed;
    left: 20px;
    bottom: 96px;
    width: min(400px, calc(100vw - 28px));
    max-height: min(620px, calc(100dvh - 110px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hs-lc-line);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(.97);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.hs-lc.is-open .hs-lc-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hs-lc-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
    color: #fff;
}
.hs-lc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hs-lc-header-text { flex: 1; min-width: 0; }
.hs-lc-title { font-size: 15.5px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.hs-lc-sub {
    font-size: 12px;
    opacity: .92;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.hs-lc-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}
.hs-lc-close {
    border: 0;
    background: rgba(255,255,255,.16);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.hs-lc-close:hover { background: rgba(255,255,255,.28); }

/* ---- Pre-form ---- */
.hs-lc-preform {
    display: flex;
    flex-direction: column;
    padding: 18px 18px 14px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f0f9ff 0%, #fff 40%);
}
.hs-lc-preform[hidden] { display: none !important; }
.hs-lc-preform-intro { text-align: center; margin-bottom: 14px; }
.hs-lc-preform-icon { margin-bottom: 8px; }
.hs-lc-preform-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--hs-lc-ink);
    margin: 0 0 6px;
}
.hs-lc-preform-text {
    font-size: 13px;
    color: var(--hs-lc-muted);
    margin: 0;
    line-height: 1.45;
}
.hs-lc-preform-form { display: flex; flex-direction: column; gap: 10px; }
.hs-lc-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}
.hs-lc-field label span { color: #ef4444; }
.hs-lc-field-input {
    width: 100%;
    border: 1px solid var(--hs-lc-line);
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.hs-lc-field-input:focus {
    border-color: var(--hs-lc-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}
.hs-lc-field-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* TR telefon: bayrak + +90 | numara */
.hs-lc-phone-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--hs-lc-line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.hs-lc-phone-wrap:focus-within {
    border-color: var(--hs-lc-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}
.hs-lc-phone-cc {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 0 12px 0 10px;
    background: #f8fafc;
    border-right: 1px solid var(--hs-lc-line);
    user-select: none;
}
.hs-lc-flag {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}
.hs-lc-flag svg {
    width: 26px;
    height: 26px;
    display: block;
}
.hs-lc-cc-text {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.hs-lc-phone-input {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 12px;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}
.hs-lc-phone-input:focus {
    box-shadow: none !important;
}
.hs-lc-preform-error {
    margin: 0;
    font-size: 12.5px;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 8px 10px;
}
.hs-lc-preform-error[hidden] { display: none !important; }
.hs-lc-preform-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.28);
    transition: transform .15s ease, opacity .15s;
}
.hs-lc-preform-submit:hover { transform: translateY(-1px); }
.hs-lc-preform-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---- Chat ---- */
.hs-lc-chat {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.hs-lc-chat[hidden] { display: none !important; }

.hs-lc-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(14,165,233,.06), transparent 55%),
        #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 220px;
    max-height: 340px;
    overscroll-behavior: contain;
}
.hs-lc-msg { display: flex; }
.hs-lc-msg--visitor { justify-content: flex-end; }
.hs-lc-msg--agent, .hs-lc-msg--system { justify-content: flex-start; }
.hs-lc-bubble {
    max-width: 88%;
    padding: 10px 13px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
    background: #fff;
    border: 1px solid var(--hs-lc-line);
    color: #334155;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hs-lc-msg--visitor .hs-lc-bubble {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: transparent;
    color: #fff;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}
.hs-lc-msg--system .hs-lc-bubble {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0c4a6e;
    font-size: 12.5px;
}

/* WhatsApp tarzı iletildi / görüldü */
.hs-lc-msg--visitor {
    flex-direction: column;
    align-items: flex-end;
}
.hs-lc-receipt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    margin-right: 4px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    color: #94a3b8;
    user-select: none;
}
.hs-lc-receipt-ticks {
    letter-spacing: -0.12em;
    font-size: 12px;
    font-weight: 700;
}
.hs-lc-receipt--sent .hs-lc-receipt-ticks { color: #94a3b8; }
.hs-lc-receipt--delivered .hs-lc-receipt-ticks { color: #64748b; }
.hs-lc-receipt--seen .hs-lc-receipt-ticks { color: #0ea5e9; }
.hs-lc-receipt--seen .hs-lc-receipt-label { color: #0284c7; }
.hs-lc-receipt-label { font-size: 10px; font-weight: 600; }

.hs-lc-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--hs-lc-line);
    background: #fff;
}
.hs-lc-row { display: flex; gap: 8px; align-items: center; }
.hs-lc-attach {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--hs-lc-line);
    background: #f8fafc;
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.hs-lc-attach:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}
.hs-lc-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
.hs-lc-file-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    font-size: 12.5px;
    color: #0c4a6e;
}
.hs-lc-file-preview[hidden] { display: none !important; }
.hs-lc-file-preview-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.hs-lc-file-preview-rm {
    border: 0;
    background: transparent;
    color: #0369a1;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 6px;
}
.hs-lc-attach-card {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(15,23,42,.08);
    color: inherit;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
}
.hs-lc-msg--visitor .hs-lc-attach-card {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.25);
    color: #fff;
}
.hs-lc-attach-thumb {
    display: block;
    max-width: 100%;
    max-height: 160px;
    border-radius: 10px;
    margin-top: 6px;
    cursor: pointer;
}
.hs-lc-input {
    flex: 1;
    border: 1px solid var(--hs-lc-line);
    border-radius: 999px;
    padding: 11px 15px;
    font-size: 13.5px;
    outline: none;
    min-width: 0;
    background: #f8fafc;
}
.hs-lc-input:focus {
    border-color: var(--hs-lc-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}
.hs-lc-send {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.28);
}
.hs-lc-send:disabled, .hs-lc-input:disabled { opacity: .55; cursor: not-allowed; }
.hs-lc-send svg { width: 18px; height: 18px; }
.hs-lc-hint {
    font-size: 10.5px;
    color: #94a3b8;
    text-align: center;
    margin: 0;
    line-height: 1.35;
}
.hs-lc .visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

@media (max-width: 576px) {
    .hs-lc-fab { left: 14px; bottom: 14px; width: 56px; height: 56px; }
    .hs-lc-fab-tip { display: none; }
    .hs-lc-panel {
        left: 8px;
        right: 8px;
        bottom: 80px;
        width: auto;
        max-height: calc(100dvh - 90px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .hs-lc-fab, .hs-lc-panel { transition: none; }
    .hs-lc-fab-ring, .hs-lc-fab-dot { animation: none; }
}
