/* Faithful Radio Chatbot Styles */

.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.chatbot-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.chatbot-button.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    border-radius: 50%;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 420px;
    height: 650px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.chatbot-message.user .chatbot-message-avatar {
    background: #28a745;
}

.chatbot-message-content {
    max-width: 70%;
}

.chatbot-message-bubble {
    padding: 14px 18px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    line-height: 1.7;
    font-size: 14px;
    color: #333;
    max-width: 100%;
    overflow-wrap: break-word;
}

.chatbot-message.user .chatbot-message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chatbot-message-time {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    padding: 0 4px;
}

.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chatbot-suggestion-btn {
    padding: 6px 12px;
    border-radius: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-suggestion-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
}

.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite;
}

.chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

.chatbot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    color: #333;
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input::placeholder {
    color: #999;
}

.chatbot-input:focus {
    border-color: #667eea;
}

.chatbot-navigate-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
    margin-top: 8px;
}

.chatbot-navigate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 90px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 500px;
    }
    
    .chatbot-button {
        bottom: 10px;
        right: 10px;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Markdown-style formatting in messages */
.chatbot-message-bubble {
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
}

.chatbot-message-bubble strong {
    font-weight: 700;
    color: #333;
}

.chatbot-message-bubble p {
    margin: 8px 0;
}

.chatbot-message-bubble br {
    display: block;
    content: "";
    margin: 4px 0;
}

.chatbot-message-bubble a,
.chatbot-message-bubble .chatbot-link {
    color: #5b6eea;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 4px;
    background: rgba(91, 110, 234, 0.1);
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-block;
}

.chatbot-message-bubble a:hover,
.chatbot-message-bubble .chatbot-link:hover {
    background: rgba(91, 110, 234, 0.2);
    color: #4854d4;
}

.chatbot-message.user .chatbot-message-bubble a {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-message.user .chatbot-message-bubble a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Better list formatting */
.chatbot-message-bubble ul,
.chatbot-message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.chatbot-message-bubble li {
    margin: 4px 0;
}

/* Login prompt styling */
.chatbot-login-prompt {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #667eea;
}

.chatbot-login-btn {
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.chatbot-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.chatbot-welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.chatbot-welcome h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.chatbot-welcome p {
    margin: 0;
    font-size: 14px;
}
