/* Paylaşılan — uzaktan erişim aktif oturum float (kullanıcı + yönetici) */
.ue-active-float {
    position: fixed;
    right: 20px;
    bottom: 24px;
    /* Sidebar (100) ve mobil overlay (99) altında kalsın */
    z-index: 85;
    width: min(320px, calc(100vw - 24px));
    border-radius: 14px;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, #dc2626 10%, var(--t-card, #fff)),
        color-mix(in srgb, #ef4444 5%, var(--t-card, #fff))
    );
    border: 1px solid color-mix(in srgb, #dc2626 22%, var(--t-card-border, #fecaca));
    box-shadow:
        0 18px 40px color-mix(in srgb, #dc2626 16%, transparent),
        0 4px 12px color-mix(in srgb, var(--t-text, #0f172a) 8%, transparent);
    overflow: hidden;
    animation: ueActiveFloatIn 0.28s ease;
    touch-action: none;
    user-select: none;
    color: var(--t-text, #1e293b);
}

.ue-active-float--dragging {
    box-shadow:
        0 22px 48px color-mix(in srgb, #dc2626 22%, transparent),
        0 8px 20px color-mix(in srgb, var(--t-text, #0f172a) 12%, transparent);
    cursor: grabbing;
}

.ue-active-float-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 8px;
    background: color-mix(in srgb, #ef4444 6%, var(--t-card, #fff));
    border-bottom: 1px solid color-mix(in srgb, #dc2626 18%, var(--t-card-border, #fee2e2));
    cursor: grab;
    touch-action: none;
}

.ue-active-float--dragging .ue-active-float-head {
    cursor: grabbing;
}

.ue-active-float-grip {
    font-size: 0.72rem;
    letter-spacing: -2px;
    color: color-mix(in srgb, #ef4444 70%, var(--t-text-muted, #94a3b8));
    line-height: 1;
    flex-shrink: 0;
}

.ue-active-float-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 color-mix(in srgb, #ef4444 55%, transparent);
    animation: ueActiveFloatPulse 1.6s ease infinite;
}

.ue-active-float-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}

.ue-active-float-body {
    padding: 10px 12px 12px;
    user-select: text;
}

.ue-active-float-body p {
    margin: 0 0 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--t-text-muted, #64748b);
}

.ue-active-float-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ue-active-float-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.ue-active-float-btn--primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.ue-active-float-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}

.ue-active-float-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.ue-active-float-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ue-active-float--admin {
    left: 20px;
    right: auto;
    z-index: 85;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, #2563eb 10%, var(--t-card, #fff)),
        color-mix(in srgb, #3b82f6 5%, var(--t-card, #fff))
    );
    border-color: color-mix(in srgb, #2563eb 22%, var(--t-card-border, #bfdbfe));
    box-shadow:
        0 18px 40px color-mix(in srgb, #2563eb 16%, transparent),
        0 4px 12px color-mix(in srgb, var(--t-text, #0f172a) 8%, transparent);
}

.ue-active-float--admin .ue-active-float-head {
    background: color-mix(in srgb, #3b82f6 6%, var(--t-card, #fff));
    border-bottom-color: color-mix(in srgb, #2563eb 18%, var(--t-card-border, #dbeafe));
}

.ue-active-float--admin .ue-active-float-title {
    color: #1d4ed8;
}

.ue-active-float-dot--admin {
    background: #22c55e;
    box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 28%, transparent);
    animation: ueActiveFloatPulseAdmin 1.6s ease infinite;
}

[data-theme="dark"] .ue-active-float-title,
[data-theme="midnight"] .ue-active-float-title {
    color: #f87171;
}

[data-theme="dark"] .ue-active-float--admin .ue-active-float-title,
[data-theme="midnight"] .ue-active-float--admin .ue-active-float-title {
    color: #93c5fd;
}

[data-theme="dark"] .ue-active-float-body p,
[data-theme="midnight"] .ue-active-float-body p {
    color: var(--t-text-muted, #94a3b8);
}

@keyframes ueActiveFloatIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ueActiveFloatPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, #ef4444 55%, transparent);
    }
    50% {
        box-shadow: 0 0 0 6px color-mix(in srgb, #ef4444 0%, transparent);
    }
}

@keyframes ueActiveFloatPulseAdmin {
    0%, 100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, #22c55e 55%, transparent);
    }
    50% {
        box-shadow: 0 0 0 6px color-mix(in srgb, #22c55e 0%, transparent);
    }
}

@media (max-width: 768px) {
    .ue-active-float--admin {
        left: auto;
        right: 12px;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        width: min(300px, calc(100vw - 24px));
    }
}

@media (max-width: 480px) {
    .ue-active-float:not(.ue-active-float--admin) {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: min(300px, calc(100vw - 24px));
    }
}
