/* ============================================================
   SCT Product Assistant — Chat Widget
   ============================================================ */

.assistant-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #21B4A6;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(33,180,166,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    z-index: 9999;
    transition: transform 0.2s, box-shadow 0.2s;
}
.assistant-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(33,180,166,0.5);
}
.assistant-bubble--active {
    background: #111A28;
    border: 2px solid #21B4A6;
}

.assistant-panel {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 360px;
    max-height: 500px;
    background: #1C2A3C;
    border: 1px solid #2a3a4c;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
}
.assistant-panel--open {
    display: flex;
}

.assistant-header {
    padding: 14px 18px;
    background: #111A28;
    border-bottom: 1px solid #2a3a4c;
    display: flex;
    align-items: center;
    gap: 10px;
}
.assistant-header-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #21B4A6;
}
.assistant-header-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #EDF6F3;
    flex: 1;
}
.assistant-header-close {
    background: none;
    border: none;
    color: #8899AA;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    line-height: 1;
}

.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 340px;
}

.assistant-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88em;
    line-height: 1.5;
    word-wrap: break-word;
}
.assistant-msg--user {
    align-self: flex-end;
    background: #21B4A6;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.assistant-msg--bot {
    align-self: flex-start;
    background: rgba(255,255,255,0.06);
    color: #EDF6F3;
    border-bottom-left-radius: 4px;
}
.assistant-msg--error {
    align-self: center;
    background: rgba(255,107,107,0.12);
    color: #ff6b6b;
    font-size: 0.82em;
    text-align: center;
}
.assistant-msg--typing {
    align-self: flex-start;
    background: rgba(255,255,255,0.04);
    color: #8899AA;
    font-style: italic;
}

.assistant-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #2a3a4c;
    background: #111A28;
}
.assistant-input {
    flex: 1;
    background: #1C2A3C;
    border: 1px solid #2a3a4c;
    border-radius: 8px;
    padding: 8px 12px;
    color: #EDF6F3;
    font-size: 0.88em;
    outline: none;
    font-family: inherit;
}
.assistant-input:focus {
    border-color: #21B4A6;
}
.assistant-input::placeholder {
    color: #556677;
}
.assistant-send {
    background: #21B4A6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88em;
    transition: background 0.2s;
}
.assistant-send:hover {
    background: #0FAF9F;
}
.assistant-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .assistant-panel {
        right: 8px;
        left: 8px;
        bottom: 84px;
        width: auto;
        max-height: 70vh;
    }
    .assistant-bubble {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.3em;
    }
}
