/* SLMBot Voice Assistant WordPress Plugin Styles */

.slmbot-container {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Position variants */
.slmbot-bottom-right {
    bottom: 20px;
    right: 20px;
}

.slmbot-bottom-left {
    bottom: 20px;
    left: 20px;
}

.slmbot-top-right {
    top: 20px;
    right: 20px;
}

.slmbot-top-left {
    top: 20px;
    left: 20px;
}

/* Bubble */
.slmbot-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.slmbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.slmbot-bubble span {
    font-size: 24px;
    color: white;
}

/* Widget */
.slmbot-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    display: none;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.slmbot-bottom-left .slmbot-widget {
    right: auto;
    left: 0;
}

.slmbot-top-right .slmbot-widget {
    bottom: auto;
    top: 80px;
}

.slmbot-top-left .slmbot-widget {
    bottom: auto;
    top: 80px;
    right: auto;
    left: 0;
}

/* Header */
.slmbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slmbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.slmbot-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.slmbot-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* Status */
.slmbot-status {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slmbot-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
}

.slmbot-status-dot.active {
    background: #28a745;
    animation: pulse 2s infinite;
}

.slmbot-status-dot.listening {
    background: #17a2b8;
    animation: pulse 1s infinite;
}

.slmbot-status-dot.processing {
    background: #ffc107;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.slmbot-status-text {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

/* Controls */
.slmbot-controls {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slmbot-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.slmbot-btn-primary {
    background: #28a745;
    color: white;
}

.slmbot-btn-primary:hover {
    background: #218838;
}

.slmbot-btn-danger {
    background: #dc3545;
    color: white;
}

.slmbot-btn-danger:hover {
    background: #c82333;
}

.slmbot-btn-secondary {
    background: #6c757d;
    color: white;
}

.slmbot-btn-secondary:hover {
    background: #545b62;
}

.slmbot-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Chat */
.slmbot-chat {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    max-height: 250px;
}

.slmbot-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slmbot-message.user {
    flex-direction: row-reverse;
}

.slmbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.slmbot-message.bot .slmbot-avatar {
    background: #6f42c1;
}

.slmbot-message.user .slmbot-avatar {
    background: #007bff;
}

.slmbot-content {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.slmbot-message.user .slmbot-content {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.slmbot-message.bot .slmbot-content {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e1e5e9;
    border-bottom-left-radius: 4px;
}

.slmbot-content p {
    margin: 0;
}

/* Text Input */
.slmbot-input {
    padding: 16px 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 8px;
}

.slmbot-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.slmbot-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.slmbot-input button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.slmbot-input button:hover {
    background: #5a67d8;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .slmbot-widget {
        width: 300px;
        height: 450px;
    }
    
    .slmbot-bottom-right,
    .slmbot-bottom-left {
        bottom: 10px;
        right: 10px;
        left: auto;
    }
    
    .slmbot-top-right,
    .slmbot-top-left {
        top: 10px;
        right: 10px;
        left: auto;
    }
}

@media (max-width: 480px) {
    .slmbot-widget {
        width: 280px;
        height: 400px;
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: auto;
        border-radius: 12px 12px 0 0;
    }
    
    .slmbot-bubble {
        display: none;
    }
}
