.smart-search { position: relative; }
.search-suggestions {
    position: absolute; z-index: 2200; left: 0; right: 0; top: calc(100% + 0.35rem);
    display: none; padding: 0.35rem; border: 1px solid rgba(139,92,246,.25);
    border-radius: 0.8rem; background: rgba(255,255,255,.96); box-shadow: 0 18px 45px rgba(35,18,66,.18);
    backdrop-filter: blur(16px);
}
.search-suggestions.active { display: grid; }
.search-suggestion {
    display: flex; gap: .65rem; align-items: center; width: 100%; padding: .65rem .75rem;
    color: var(--gray-700); text-align: left; border-radius: .55rem; font-size: .82rem;
}
.search-suggestion:hover { background: var(--primary-50); color: var(--primary-dark); }
.search-suggestion i { color: var(--primary-light); font-size: .75rem; }
.support-widget {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    top: calc(50% - 1.8rem);
    z-index: 3000;
    width: 3.6rem;
    max-width: calc(100% - 2rem);
    font-family: var(--font-sans);
    contain: layout paint;
}
.support-widget.is-moved { touch-action: none; }
.support-widget.is-dragging { user-select: none; }
.support-launcher {
    width: 3.6rem; height: 3.6rem; border-radius: 1.15rem; color: #fff; font-size: 1.25rem;
    background: linear-gradient(145deg, rgba(109,40,217,.98), rgba(30,12,58,.98));
    box-shadow: 0 12px 30px rgba(54,20,105,.38), inset 0 1px rgba(255,255,255,.35);
    position: relative; transition: transform .2s ease, box-shadow .2s ease;
    cursor: grab; touch-action: none; user-select: none;
}
.support-launcher:active { cursor: grabbing; }
.support-launcher:hover { transform: translateY(-3px) rotate(-2deg); box-shadow: 0 16px 36px rgba(54,20,105,.48); }
.support-pulse { position: absolute; top: .5rem; right: .55rem; width: .45rem; height: .45rem; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 .25rem rgba(74,222,128,.16); }
.support-panel {
    position: absolute;
    right: 0;
    bottom: 4.35rem;
    width: min(360px, calc(100vw - 2rem));
    width: min(360px, calc(100dvw - 2rem));
    max-width: calc(100vw - 2rem);
    max-width: calc(100dvw - 2rem);
    min-width: 0;
    overflow: hidden;
    display: none; grid-template-rows: auto auto 1fr auto auto; height: min(500px, calc(100vh - 7rem));
    border: 1px solid rgba(255,255,255,.18); border-radius: 1.25rem; color: #f8f7ff;
    background: linear-gradient(155deg, rgba(27,16,47,.94), rgba(12,10,23,.92)); backdrop-filter: blur(24px);
    box-shadow: 0 24px 70px rgba(18,8,39,.45);
}
.support-panel.active { display: grid; animation: supportIn .22s ease-out; }
@keyframes supportIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.support-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1rem .8rem; }
.support-header strong, .support-header small { display: block; }
.support-header strong { font-size: .95rem; }
.support-header small { margin-top: .2rem; color: #c7b9df; font-size: .7rem; }
.support-status-dot { display: inline-block; width: .42rem; height: .42rem; margin-right: .3rem; border-radius: 50%; background: #4ade80; }
.support-close { color: #c7b9df; font-size: 1rem; }
.support-tabs { display: flex; gap: .35rem; padding: 0 .8rem .65rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.support-tabs button { flex: 1; padding: .5rem; border-radius: .6rem; color: #b9accd; font-size: .72rem; }
.support-tabs button.active { color: #fff; background: rgba(139,92,246,.28); }
.support-messages { overflow: auto; padding: .9rem; }
.support-message { max-width: 86%; margin-bottom: .65rem; padding: .65rem .75rem; border-radius: .8rem; font-size: .75rem; line-height: 1.5; }
.support-message,
.support-note,
.support-header strong,
.support-header small { overflow-wrap: anywhere; }
.support-message.assistant { border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.08); color: #ede7f8; }
.support-message.user { margin-left: auto; background: #6d28d9; color: #fff; }
.support-form { display: flex; gap: .45rem; padding: .7rem .8rem; border-top: 1px solid rgba(255,255,255,.1); }
.support-form input { min-width: 0; flex: 1; padding: .65rem .7rem; border: 1px solid rgba(255,255,255,.14); border-radius: .65rem; background: rgba(255,255,255,.08); color: #fff; font-size: .75rem; }
.support-form input::placeholder { color: #a99abd; }
.support-form button { width: 2.2rem; border-radius: .65rem; background: #8b5cf6; color: #fff; }
.support-note { margin: 0; padding: 0 .85rem .75rem; color: #a99abd; font-size: .64rem; }
@media (max-width: 640px) {
    .support-widget {
        right: max(.75rem, env(safe-area-inset-right, 0px));
        top: calc(42% - 1.8rem);
    }
    .support-panel {
        right: 0;
        bottom: 4.35rem;
        width: min(360px, calc(100vw - 1.5rem));
        width: min(360px, calc(100dvw - 1.5rem));
        max-width: calc(100vw - 1.5rem);
        max-width: calc(100dvw - 1.5rem);
        height: min(500px, calc(100dvh - 9.25rem));
    }
}