/* Semengineer — DİO tarzı chat widget (beyaz pill + marka renkleri) */

.support-widget {
    --sw-navy: #0f172a;
    --sw-brand: #f6c23e;
    --sw-cream: #fff8e6;
    --sw-surface: #f4f6f9;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    width: min(360px, calc(100vw - 1.25rem));
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* FAB */
.support-widget__fab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    margin-left: auto;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--sw-navy);
    background: linear-gradient(145deg, var(--sw-brand) 0%, #f59e0b 100%);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.support-widget__fab:hover {
    transform: scale(1.05);
    box-shadow: 0 18px 42px rgba(246, 194, 62, 0.45);
}

.support-widget__fab-dot {
    position: absolute;
    top: 0.12rem;
    right: 0.12rem;
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--sw-navy);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.support-widget__fab-icon--close {
    display: none;
    color: #fff;
}

.support-widget.is-open .support-widget__fab-icon--chat {
    display: none;
}

.support-widget.is-open .support-widget__fab-icon--close {
    display: block;
}

.support-widget.is-open .support-widget__fab {
    background: linear-gradient(145deg, var(--sw-navy) 0%, #1e293b 100%);
    color: #fff;
}

/* Panel */
.support-widget__panel {
    position: absolute;
    right: 0;
    bottom: calc(3.6rem + 0.65rem);
    left: 0;
    display: flex;
    flex-direction: column;
    max-height: min(78vh, 560px);
    border-radius: 1.5rem;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 28px 60px -16px rgba(15, 23, 42, 0.35),
        0 0 0 1px rgba(15, 23, 42, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.97);
    pointer-events: none;
    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        visibility 0.28s ease;
}

.support-widget.is-open .support-widget__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

/* Header — lacivert */
.support-widget__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 1rem 1rem 0.95rem;
    background: linear-gradient(135deg, var(--sw-navy) 0%, #1a2744 100%);
}

.support-widget__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.support-widget__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.65rem;
    color: var(--sw-navy);
    background: linear-gradient(145deg, var(--sw-brand) 0%, #fbbf24 100%);
}

.support-widget__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.site-premium .support-widget__head .support-widget__title {
    color: #ffffff !important;
}

.support-widget__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.2rem 0 0;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.support-widget__status-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.support-widget__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease;
}

.support-widget__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Chat body */
.support-widget__chat {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1rem 0.85rem;
    background: var(--sw-surface);
}

.support-widget__message {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.support-widget__message-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    flex-shrink: 0;
    border-radius: 0.45rem;
    color: #fff;
    background: var(--sw-navy);
}

.support-widget__bubble {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.support-widget__bubble p {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.45;
    color: #334155;
}

/* Dikey pill menü */
.support-widget__menu {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.support-widget__pill {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.72rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sw-navy);
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.support-widget__pill:hover {
    transform: translateY(-1px);
    border-color: rgba(246, 194, 62, 0.45);
    box-shadow: 0 8px 22px rgba(246, 194, 62, 0.2);
}

.support-widget__pill-ico {
    font-size: 1.05rem;
    line-height: 1;
}

/* Footer */
.support-widget__foot {
    padding: 0.85rem 1rem 0.75rem;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.support-widget__form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.support-widget__input {
    flex: 1;
    min-width: 0;
    height: 2.65rem;
    padding: 0 1rem;
    border: 1.5px solid var(--sw-brand);
    border-radius: 9999px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--sw-navy);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.support-widget__input::placeholder {
    color: #94a3b8;
}

.support-widget__input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(246, 194, 62, 0.25);
}

.support-widget__send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--sw-navy);
    background: linear-gradient(145deg, var(--sw-brand) 0%, #f59e0b 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-widget__send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(246, 194, 62, 0.45);
}

.support-widget__powered {
    margin: 0.55rem 0 0;
    font-size: 0.62rem;
    font-weight: 500;
    color: #94a3b8;
    text-align: center;
}

.support-widget__powered strong {
    font-weight: 700;
    color: #64748b;
}

@media (min-width: 1024px) {
    .support-widget {
        right: 1.25rem;
        bottom: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .support-widget__panel,
    .support-widget__pill,
    .support-widget__fab,
    .support-widget__send {
        transition: none;
    }
}
