/* τAI Support Chat Widget — consistent across all Tyga.Cloud sister sites */
/* Gold accent (#c8a030) override — base layout matches bandsaas.com exactly */

.sc-bubble {
    position: fixed; bottom: 24px; right: 24px; z-index: 9990;
    width: 56px; height: 56px; min-height: 56px; border-radius: 50%;
    background: #c8a030; color: #0c0b08; border: none; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; transition: transform 0.2s, box-shadow 0.2s;
}
.sc-bubble:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.sc-bubble svg { width: 28px; height: 28px; fill: currentColor; }
.sc-bubble .sc-close { display: none; }
.sc-bubble.open .sc-chat-icon { display: none; }
.sc-bubble.open .sc-close { display: block; }

.sc-panel {
    position: fixed; bottom: 92px; right: 24px; z-index: 9989;
    width: 380px; height: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 120px);
    border-radius: 16px;
    background: #121212; box-shadow: 0 12px 40px rgba(0,0,0,.4);
    display: none; flex-direction: column; overflow: hidden;
    font-family: 'Geist Sans', 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    border: 1px solid #2d2d2d;
}
.sc-panel.open { display: flex; }
.sc-panel.maximized {
    position: fixed; bottom: 50%; right: 50%; transform: translate(50%, 50%);
    width: 560px; height: 80vh; max-height: 80vh;
    border-radius: 16px;
}

.sc-header {
    background: #c8a030; color: #0c0b08; padding: 14px 16px;
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 15px;
    flex-shrink: 0;
}
.sc-header .sc-logo {
    height: 24px; width: auto; flex-shrink: 0;
}
.sc-header span { flex: 1; }
.sc-header-actions { display: flex; gap: 4px; margin-left: auto; }
.sc-header-btn {
    background: none; border: none; color: #0c0b08; cursor: pointer;
    font-size: 16px; opacity: 0.7; min-height: auto; padding: 4px;
    width: 28px; height: 28px; min-height: 28px; display: flex;
    align-items: center; justify-content: center; border-radius: 6px;
    transition: opacity 0.15s, background 0.15s;
}
.sc-header-btn svg { width: 16px; height: 16px; fill: currentColor; }
.sc-header-btn:hover { opacity: 1; background: rgba(0,0,0,0.1); }

.sc-messages {
    flex: 1; overflow-y: auto; padding: 16px; min-height: 0;
    display: flex; flex-direction: column; gap: 12px;
    background: #0c0b08;
}

.sc-msg {
    max-width: 85%; padding: 10px 14px; border-radius: 12px;
    font-size: 14px; line-height: 1.5; word-wrap: break-word;
}
.sc-msg.user {
    align-self: flex-end; background: #c8a030; color: #0c0b08;
    border-bottom-right-radius: 4px;
}
.sc-msg.assistant {
    align-self: flex-start; background: #1e1e1e; color: #e5e7eb;
    border-bottom-left-radius: 4px;
}
.sc-msg.assistant strong { color: #e0be50; }
.sc-msg.assistant code {
    background: #2d2a24; padding: 2px 6px; border-radius: 4px;
    font-size: 13px; font-family: 'SF Mono', 'Fira Code', monospace;
}
.sc-msg.system {
    align-self: center; font-size: 12px; color: #6b6558;
    background: none; padding: 4px 0;
}

.sc-typing {
    padding: 10px 14px; background: #1e1e1e;
    border-radius: 12px; display: none; gap: 4px;
    margin: 0 16px; align-items: center; width: fit-content;
}
.sc-typing.active { display: flex; }
.sc-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: #6b6558;
    animation: sc-dot 1.4s infinite ease-in-out both;
}
.sc-typing span:nth-child(2) { animation-delay: 0.16s; }
.sc-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes sc-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.sc-quick-replies {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px;
    background: #0c0b08; flex-shrink: 0;
}
.sc-quick-btn {
    padding: 6px 12px; border-radius: 16px; border: 1px solid #c8a030;
    background: transparent; color: #e0be50; cursor: pointer; font-size: 12px;
    min-height: auto; transition: background 0.15s, color 0.15s;
}
.sc-quick-btn:hover { background: #c8a030; color: #0c0b08; }

.sc-input-area {
    display: flex; padding: 12px 16px; border-top: 1px solid #2d2d2d;
    gap: 8px; background: #121212; flex-shrink: 0;
}
.sc-input {
    flex: 1; border: 1px solid #2d2d2d; border-radius: 24px; padding: 10px 16px;
    font-size: 14px; outline: none; resize: none; font-family: inherit;
    background: #1e1e1e; color: #e5e7eb; max-height: 80px;
}
.sc-input::placeholder { color: #6b6558; }
.sc-input:focus { border-color: #c8a030; }
.sc-send {
    background: #c8a030; color: #0c0b08; border: none; border-radius: 50%;
    width: 40px; height: 40px; min-height: 40px; flex-shrink: 0;
    cursor: pointer; font-weight: 600; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.sc-send svg { width: 18px; height: 18px; fill: currentColor; }
.sc-send:hover { background: #e0be50; }
.sc-send:disabled { opacity: 0.5; cursor: not-allowed; }

.sc-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9988; display: none;
}
.sc-backdrop.active { display: block; }

.sc-escalation {
    background: rgba(200,160,48,0.1); border-left: 3px solid #c8a030;
    padding: 8px 12px; margin: 4px 0; border-radius: 4px;
    font-size: 12px; color: #e0be50;
}

.sc-progress { padding: 8px 16px; background: #121212; border-bottom: 1px solid #2d2d2d; flex-shrink: 0; }
.sc-progress-bar { height: 4px; background: #2d2d2d; border-radius: 2px; overflow: hidden; }
.sc-progress-fill { height: 100%; background: #4ade80; transition: width 0.3s; }
.sc-progress-label { font-size: 11px; color: #6b6558; margin-top: 4px; }

/* Mobile */
@media (max-width: 600px) {
    .sc-panel {
        width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
        bottom: 0; right: 0; border-radius: 0; border: none; box-shadow: none;
    }
    .sc-panel.maximized {
        width: 100vw; height: 100vh; max-height: 100vh;
        top: 0; left: 0; bottom: 0; right: 0; transform: none;
        border-radius: 0;
    }
    .sc-bubble { width: 48px; height: 48px; min-height: 48px; bottom: 16px; right: 16px; }
    .sc-bubble.open { width: 40px; height: 40px; min-height: 40px; top: 12px; right: 12px; bottom: auto; z-index: 9991; }
}
