.support-widget-root {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 12000;
    font-family: 'Yazı', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: none;
}

.support-widget-root.is-ready { display: block; }

.support-launcher-wrap {
    position: relative;
    width: 58px;
    height: 58px;
    touch-action: none;
}

.support-launcher {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

.support-launcher:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .34);
}

.support-launcher img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 50%; pointer-events: none; user-select: none; }

.support-dismiss {
    position: absolute;
    z-index: 2;
    top: -7px;
    right: -7px;
    width: 23px;
    height: 23px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: grid;
    place-items: center;
    padding: 0 0 2px;
    font: 800 15px/1 Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .25);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.support-dismiss:hover { background: #374151; transform: scale(1.06); box-shadow: 0 5px 13px rgba(15, 23, 42, .3); }

.support-widget-root.is-dragging .support-launcher { cursor: grabbing; transform: scale(1.04); }

.support-panel {
    position: fixed;
    right: auto;
    bottom: auto;
    width: min(370px, calc(100vw - 28px));
    height: min(590px, calc(100vh - 115px));
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 20px;
    overflow: visible;
    background: #fff;
    color: #111827;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    display: none;
    grid-template-rows: auto minmax(0, 1fr);
    transform-origin: bottom right;
}

.support-panel.is-open { display: grid; animation: supportPop .18s ease-out; }

.support-peek-robot {
    position: absolute;
    z-index: 4;
    top: -98px;
    left: 24px;
    width: 165px;
    height: auto;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 8px 10px rgba(15, 23, 42, .18));
}

@keyframes supportPop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.support-header {
    min-height: 64px;
    padding: 12px 14px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 11px;
    border-radius: 20px 20px 0 0;
}

.support-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.support-header-avatar img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 50%; }
.support-header-copy { min-width: 0; flex: 1; }
.support-header-title { font-size: 14px; font-weight: 800; }
.support-header-subtitle { margin-top: 2px; font-size: 11px; color: #cbd5e1; }

.support-header-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

.support-body {
    min-height: 0;
    overflow: hidden;
    background: #f8fafc;
    border-radius: 0 0 20px 20px;
}

.support-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.support-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
}

.support-intro {
    display: flex;
    align-items: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.support-intro-robot {
    width: 72px;
    height: 100px;
    object-fit: contain;
    flex: 0 0 auto;
    user-select: none;
}

.support-bubble {
    max-width: calc(100% - 82px);
    padding: 10px 12px;
    border-radius: 5px 14px 14px 14px;
    background: #e5e7eb;
    font-size: 13px;
    line-height: 1.45;
}

.support-primary-btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    background: #111827;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.support-primary-btn:disabled { opacity: .55; cursor: wait; }
.support-new-ticket-btn { width: 100%; padding: 14px 18px; font-size: 15px; text-align: center; }
.support-list-heading { margin: 18px 0 9px; font-size: 12px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }
.support-ticket-list { display: grid; gap: 8px; }

.support-ticket-card {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    padding: 11px 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.support-ticket-card:hover { border-color: #94a3b8; }
.support-ticket-top { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.support-ticket-subject { min-width: 0; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.support-ticket-preview { margin-top: 5px; color: #64748b; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.support-ticket-meta { margin-top: 7px; color: #94a3b8; font-size: 10px; }

.support-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.support-status-new { background: #fee2e2; color: #b91c1c; }
.support-status-read { background: #dbeafe; color: #1d4ed8; }
.support-status-resolved { background: #dcfce7; color: #15803d; }

.support-form { padding: 14px; display: grid; gap: 12px; }
.support-label { display: grid; gap: 6px; color: #334155; font-size: 12px; font-weight: 750; }
.support-input, .support-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    padding: 10px 11px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 13px;
    outline: none;
}
.support-input:focus, .support-textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.support-textarea { resize: vertical; min-height: 112px; max-height: 220px; }
.support-form-error { min-height: 17px; color: #dc2626; font-size: 11px; }

.support-view-toolbar {
    min-height: 48px;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 9px;
}
.support-back-btn { border: 0; background: #f1f5f9; border-radius: 9px; width: 32px; height: 32px; cursor: pointer; }
.support-detail-title { min-width: 0; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-messages { display: grid; align-content: start; gap: 8px; }
.support-message { justify-self: end; max-width: 88%; padding: 10px 12px; border-radius: 14px 4px 14px 14px; background: #111827; color: #fff; }
.support-message-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
.support-message-meta { margin-top: 5px; color: #94a3b8; font-size: 9px; text-align: right; }

.support-composer {
    padding: 10px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.support-composer textarea { min-height: 40px; max-height: 90px; resize: none; }
.support-send-btn { width: 42px; height: 42px; border: 0; border-radius: 11px; background: #111827; color: #fff; cursor: pointer; flex: 0 0 auto; }
.support-empty, .support-loading { padding: 24px 12px; text-align: center; color: #94a3b8; font-size: 12px; }

@media (max-width: 600px) {
    .support-widget-root { right: 14px; bottom: 14px; }
    .support-panel { position: fixed; inset: 82px 12px 12px; width: auto; height: auto; max-height: none; }
    .support-peek-robot { top: -72px; left: 18px; width: 122px; }
    .support-intro-robot { width: 62px; height: 88px; }
    .support-bubble { max-width: calc(100% - 72px); }
}
