.support-ai {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 1000;
    font-family: inherit;
}

/* Toggle Button */
.support-ai__toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 16px 10px 12px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.35);
    transition: all 0.25s ease;
}

.support-ai__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(37, 99, 235, 0.45);
}

.support-ai__toggle-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 18px;
}

.support-ai__toggle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.support-ai__toggle-text strong {
    font-size: 14px;
    font-weight: 800;
}

.support-ai__toggle-text small {
    margin-top: 2px;
    font-size: 11px;
    opacity: 0.85;
}

.support-ai__pulse {
    position: absolute;
    top: 7px;
    left: 9px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
    animation: supportPulse 1.8s infinite;
}

@keyframes supportPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Chat Panel */
.support-ai__panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(390px, calc(100vw - 28px));
    height: min(590px, calc(100vh - 135px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
}

/* Important close fix */
.support-ai__panel[hidden] {
    display: none !important;
}

/* Header */
.support-ai__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #ffffff;
}

.support-ai__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.support-ai__avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 18px;
}

.support-ai__header strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.support-ai__header small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.support-ai__close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: 0.2s ease;
}

.support-ai__close:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: rotate(90deg);
}

/* Online Status */
.support-ai__status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.support-ai__status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

/* Messages */
.support-ai__messages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32%),
        #f8fafc;
}

.support-ai__messages::-webkit-scrollbar {
    width: 6px;
}

.support-ai__messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.support-ai__msg {
    width: fit-content;
    max-width: 86%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
}

.support-ai__msg--bot {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 6px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.support-ai__msg--user {
    margin-left: auto;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

/* Quick Buttons */
.support-ai__quick {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    overflow-x: auto;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.support-ai__quick button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.support-ai__quick button:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}

/* Input Form */
.support-ai__form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.support-ai__form input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
}

.support-ai__form input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.support-ai__form button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: 0.2s ease;
}

.support-ai__form button:hover {
    transform: translateY(-1px) scale(1.03);
}

/* Note */
.support-ai__note {
    margin: 0;
    padding: 10px 16px 14px;
    background: #ffffff;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 760px) {
    .support-ai {
        right: 16px;
        bottom: 84px;
    }

    .support-ai__toggle {
        min-height: 52px;
        padding: 9px 14px 9px 10px;
    }

    .support-ai__toggle-icon {
        width: 36px;
        height: 36px;
    }

    .support-ai__panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 86px;
        width: auto;
        height: min(560px, calc(100vh - 120px));
        border-radius: 22px;
    }

    .support-ai__header {
        padding: 16px;
    }

    .support-ai__msg {
        max-width: 90%;
        font-size: 13px;
    }

    .support-ai__quick {
        padding: 10px 12px;
    }

    .support-ai__form {
        padding: 12px;
    }
}

@media (max-width: 420px) {
    .support-ai__toggle-text small {
        display: none;
    }

    .support-ai__panel {
        left: 10px;
        right: 10px;
        bottom: 82px;
        height: min(540px, calc(100vh - 108px));
    }

    .support-ai__header small {
        font-size: 11px;
    }
}
/* Advanced Support AI Action Buttons */
.support-ai__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 88%;
    margin: -4px 0 14px 0;
}

.support-ai__action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    transition: 0.2s ease;
}

.support-ai__action-link:hover {
    transform: translateY(-1px);
    background: #1d4ed8;
    color: #ffffff;
}

.support-ai__form button:disabled,
.support-ai__form input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.support-ai__msg {
    white-space: pre-line;
}

@media (max-width: 520px) {
    .support-ai__actions {
        max-width: 96%;
    }

    .support-ai__action-link {
        font-size: 11px;
        padding: 7px 10px;
    }
}
