/* ===== Support Widget ===== */
#support-widget-btn {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    z-index: 1050;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#support-widget-btn:hover {
    background: #0b5ed7;
}

#support-widget-panel {
    position: fixed;
    bottom: 9rem;
    right: 1.5rem;
    z-index: 1051;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#support-widget-panel.d-none {
    display: none !important;
}

.support-widget-header {
    background: #0d6efd;
    color: #fff;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.support-widget-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.support-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8f9fa;
}

.support-msg {
    max-width: 85%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.support-msg.ai {
    background: #fff;
    border: 1px solid #dee2e6;
    align-self: flex-start;
}

.support-msg.user {
    background: #0d6efd;
    color: #fff;
    align-self: flex-end;
}

.support-msg.system {
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
    align-self: center;
    text-align: center;
    font-size: 0.8rem;
    max-width: 100%;
}

.support-widget-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid #dee2e6;
    background: #fff;
}

.support-widget-input textarea {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
    resize: none;
    height: 2.4rem;
    line-height: 1.5;
    font-family: inherit;
}

.support-widget-input textarea:focus {
    outline: none;
    border-color: #0d6efd;
}

.support-widget-input button {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.support-widget-input button:hover {
    background: #0b5ed7;
}

.support-widget-input button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.support-typing {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0 0.75rem 0.4rem;
    background: #f8f9fa;
    min-height: 1.2rem;
}

@media (max-width: 480px) {
    #support-widget-panel {
        width: calc(100vw - 2rem);
        right: 1rem;
    }
}
