/* Site-wide MindZep Guide floating chat */

.mz-ai-guide-launcher {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1051;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mz-ai-guide-launcher:hover {
    transform: scale(1.05);
    color: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.45);
}

.mz-ai-guide-launcher:focus-visible {
    outline: 3px solid rgba(250, 204, 21, 0.6);
    outline-offset: 2px;
}

.mz-ai-guide-panel {
    position: fixed;
    left: 18px;
    bottom: 86px;
    z-index: 1052;
    width: min(100vw - 36px, 380px);
    max-height: min(72vh, 520px);
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.mz-ai-guide-panel.is-open {
    display: flex;
}

.mz-ai-guide-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(120deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
}

.mz-ai-guide-head h2 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.mz-ai-guide-head p {
    margin: 0;
    font-size: 0.7rem;
    opacity: 0.85;
}

.mz-ai-guide-actions {
    display: flex;
    gap: 0.25rem;
}

.mz-ai-guide-actions button {
    background: transparent;
    border: none;
    color: #e2e8f0;
    padding: 0.35rem;
    border-radius: 8px;
    line-height: 1;
    cursor: pointer;
}

.mz-ai-guide-actions button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.mz-ai-guide-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    min-height: 200px;
}

.mz-ai-guide-msg {
    max-width: 92%;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.mz-ai-guide-msg-user {
    margin-left: auto;
    background: #0f172a;
    color: #f8fafc;
    border-bottom-right-radius: 4px;
}

.mz-ai-guide-msg-bot {
    margin-right: auto;
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.mz-ai-guide-foot {
    padding: 0.65rem 0.75rem 0.85rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.mz-ai-guide-form {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.mz-ai-guide-form input {
    flex: 1;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 0.65rem;
    font-size: 0.875rem;
}

.mz-ai-guide-form input:focus {
    border-color: #64748b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
}

.mz-ai-guide-form button[type="submit"] {
    border: none;
    border-radius: 10px;
    padding: 0 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    background: #f59e0b;
    color: #0f172a;
    cursor: pointer;
    white-space: nowrap;
}

.mz-ai-guide-form button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mz-ai-guide-hint {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.4rem;
    line-height: 1.35;
}

.mz-ai-guide-error {
    font-size: 0.75rem;
    color: #b45309;
    margin-bottom: 0.35rem;
    display: none;
}

.mz-ai-guide-error.is-visible {
    display: block;
}

.mz-ai-guide-typing {
    font-size: 0.75rem;
    color: #64748b;
    padding: 0 0 0.35rem;
    display: none;
}

.mz-ai-guide-typing.is-visible {
    display: block;
}

@media (max-width: 991.98px) {
    .mz-ai-guide-launcher {
        bottom: 88px;
    }

    .mz-ai-guide-panel {
        bottom: 156px;
        max-height: min(60vh, 480px);
    }
}

/* User/coach panel: match panel background slightly */
.mz-up-body .mz-ai-guide-scroll {
    background: #f1f5f9;
}

.mz-admin-body .mz-ai-guide-panel {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
