/* static/css/support-widget.css */
/* Support widget (scaled up) */

.support-widget {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 9999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5e7eb;
}

/* bigger launcher button */
.support-toggle {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, #facc15, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 35px rgba(0,0,0,0.65);
    cursor: pointer;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.support-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.75);
}

.support-toggle-icon {
    font-size: 26px;
}

.support-toggle-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 13px;
    color: #22c55e;
}

/* main window */

.support-window {
    position: absolute;
    bottom: 88px;
    right: 0;
    width: 420px;
    max-height: 560px;
    background: linear-gradient(145deg, #020617, #0b1120);
    border-radius: 18px;
    border: 1px solid #1f2937;
    box-shadow: 0 22px 60px rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(1);
    opacity: 1;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.support-minimized .support-window {
    transform: scale(0.0);
    opacity: 0;
    pointer-events: none;
}

/* header */

.support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: radial-gradient(circle at 0% 0%, rgba(248,250,252,0.08), transparent 55%);
    border-bottom: 1px solid #1f2937;
}

.support-title {
    font-size: 16px;
    font-weight: 600;
}

.support-subtitle {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}

.support-close-btn {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

/* status + queue */

.support-status {
    padding: 6px 16px 2px 16px;
    font-size: 13px;
    color: #f9fafb;
}

.support-queue-info {
    padding: 0 16px 8px 16px;
    font-size: 12px;
    color: #9ca3af;
}

/* messages */

.support-messages {
    flex: 1;
    padding: 10px 12px;
    overflow-y: auto;
    font-size: 14px;
}

.support-message {
    margin-bottom: 8px;
    max-width: 92%;
    word-wrap: break-word;
}

.support-message.system {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
}

.support-message.user {
    margin-left: auto;
    text-align: right;
}

.support-message.admin {
    margin-right: auto;
    text-align: left;
}

.support-bubble {
    display: inline-block;
    padding: 8px 11px;
    border-radius: 12px;
}

.support-message.user .support-bubble {
    background: #4f46e5;
    color: #f9fafb;
}

.support-message.admin .support-bubble {
    background: #111827;
    border: 1px solid #1f2937;
}

.support-message.system .support-bubble {
    background: transparent;
}

/* typing indicator */

.support-typing {
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #9ca3af;
}

.support-typing .dots {
    display: inline-flex;
    gap: 3px;
}

.support-typing .dots span {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #9ca3af;
    animation: support-dot-bounce 1.2s infinite ease-in-out;
}

.support-typing .dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.support-typing .dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes support-dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-3px); opacity: 1; }
}

/* input */

.support-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #1f2937;
    background: #020617;
}

.support-input input {
    flex: 1;
    background: #020617;
    border: 1px solid #1f2937;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
    color: #e5e7eb;
}

.support-input input:focus {
    outline: none;
    border-color: #4f46e5;
}

.support-input button {
    margin-left: 8px;
    border-radius: 999px;
    border: none;
    padding: 8px 14px;
    font-size: 14px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #f9fafb;
    cursor: pointer;
}
