/* css/ai_agent.css */
.ai-agent-chat-user {
    border-bottom-right-radius: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-agent-chat-assistant {
    border-bottom-left-radius: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#ai-agent-chat-window {
    background-color: #f8f9fa;
    scroll-behavior: smooth;
}


/* === Python Service Manager — Glass Status Badge === */
.py-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.py-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Checking / Unknown */
.py-status-badge--checking {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.28);
    color: var(--apple-accent-color);
}

.py-status-badge--checking .py-status-dot {
    background: var(--apple-accent-color);
    animation: py-dot-pulse 1.4s ease-in-out infinite;
}

/* Running */
.py-status-badge--running {
    background: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.3);
    color: #34c759;
}

.py-status-badge--running .py-status-dot {
    background: #34c759;
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.55);
    animation: py-dot-pulse 2.2s ease-in-out infinite;
}

/* Stopped */
.py-status-badge--stopped {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

.py-status-badge--stopped .py-status-dot {
    background: #ff3b30;
}

/* Dark mode overrides */
[data-bs-theme="dark"] .py-status-badge--running {
    background: rgba(48, 209, 88, 0.14);
    border-color: rgba(48, 209, 88, 0.38);
    color: #63ff8b;
}

[data-bs-theme="dark"] .py-status-badge--running .py-status-dot {
    background: #63ff8b;
    box-shadow: 0 0 8px rgba(48, 209, 88, 0.65);
}

[data-bs-theme="dark"] .py-status-badge--stopped {
    background: rgba(255, 69, 58, 0.16);
    border-color: rgba(255, 69, 58, 0.38);
    color: #ff6961;
}

[data-bs-theme="dark"] .py-status-badge--stopped .py-status-dot {
    background: #ff6961;
}

@keyframes py-dot-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.7);
    }
}


/* === Tinted Glass Action Buttons === */
.btn-glass-success,
.btn-glass-danger,
.btn-glass-warning,
.btn-glass-info {
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Green */
.btn-glass-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.35);
    color: #2aa24a;
}

.btn-glass-success:hover,
.btn-glass-success:focus {
    background: rgba(52, 199, 89, 0.2);
    border-color: rgba(52, 199, 89, 0.55);
    color: #1e8a3c;
    box-shadow: 0 0 14px rgba(52, 199, 89, 0.25);
}

/* Red */
.btn-glass-danger {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.35);
    color: #d9342a;
}

.btn-glass-danger:hover,
.btn-glass-danger:focus {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.55);
    color: #c0281f;
    box-shadow: 0 0 14px rgba(255, 59, 48, 0.25);
}

/* Amber */
.btn-glass-warning {
    background: rgba(255, 159, 10, 0.1);
    border: 1px solid rgba(255, 159, 10, 0.35);
    color: #b56e00;
}

.btn-glass-warning:hover,
.btn-glass-warning:focus {
    background: rgba(255, 159, 10, 0.2);
    border-color: rgba(255, 159, 10, 0.55);
    color: #9a5e00;
    box-shadow: 0 0 14px rgba(255, 159, 10, 0.25);
}

/* Blue */
.btn-glass-info {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.35);
    color: #0062cc;
}

.btn-glass-info:hover,
.btn-glass-info:focus {
    background: rgba(0, 122, 255, 0.2);
    border-color: rgba(0, 122, 255, 0.55);
    color: #004ea3;
    box-shadow: 0 0 14px rgba(0, 122, 255, 0.25);
}

/* Dark mode glass buttons */
[data-bs-theme="dark"] .btn-glass-success {
    background: rgba(48, 209, 88, 0.12);
    border-color: rgba(48, 209, 88, 0.38);
    color: #63ff8b;
}

[data-bs-theme="dark"] .btn-glass-success:hover,
[data-bs-theme="dark"] .btn-glass-success:focus {
    background: rgba(48, 209, 88, 0.22);
    border-color: rgba(48, 209, 88, 0.6);
    color: #7fffaa;
    box-shadow: 0 0 16px rgba(48, 209, 88, 0.3);
}

[data-bs-theme="dark"] .btn-glass-danger {
    background: rgba(255, 69, 58, 0.14);
    border-color: rgba(255, 69, 58, 0.38);
    color: #ff6961;
}

[data-bs-theme="dark"] .btn-glass-danger:hover,
[data-bs-theme="dark"] .btn-glass-danger:focus {
    background: rgba(255, 69, 58, 0.24);
    border-color: rgba(255, 69, 58, 0.6);
    color: #ff8a83;
    box-shadow: 0 0 16px rgba(255, 69, 58, 0.3);
}

[data-bs-theme="dark"] .btn-glass-warning {
    background: rgba(255, 214, 10, 0.12);
    border-color: rgba(255, 214, 10, 0.38);
    color: #ffd60a;
}

[data-bs-theme="dark"] .btn-glass-warning:hover,
[data-bs-theme="dark"] .btn-glass-warning:focus {
    background: rgba(255, 214, 10, 0.22);
    border-color: rgba(255, 214, 10, 0.6);
    color: #ffe040;
    box-shadow: 0 0 16px rgba(255, 214, 10, 0.28);
}

[data-bs-theme="dark"] .btn-glass-info {
    background: rgba(10, 132, 255, 0.14);
    border-color: rgba(10, 132, 255, 0.38);
    color: #409cff;
}

[data-bs-theme="dark"] .btn-glass-info:hover,
[data-bs-theme="dark"] .btn-glass-info:focus {
    background: rgba(10, 132, 255, 0.24);
    border-color: rgba(10, 132, 255, 0.6);
    color: #6db5ff;
    box-shadow: 0 0 16px rgba(10, 132, 255, 0.3);
}