/* Germain Chatbot Widget Styles */
#germain-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#germain-chat-button {
    background: linear-gradient(135deg, #1e40af, #dc2626);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    font-weight: 500;
}

#germain-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.germain-avatar {
    position: relative;
}

.germain-icon {
    font-size: 24px;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pulse-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1.4); 
        opacity: 0; 
    }
}

.germain-text {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#germain-chat-window {
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: linear-gradient(135deg, #1e40af, #dc2626);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-info .germain-icon {
    width: 35px;
    height: 35px;
    font-size: 20px;
}

.name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
}

.status {
    font-size: 11px;
    opacity: 0.9;
}

#germain-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#germain-close:hover {
    background: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.message {
    display: flex;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    justify-content: flex-end;
}

.germain-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}

.user-message .message-content {
    background: #1e40af;
    color: white;
    border-bottom-right-radius: 4px;
}

.germain-message .message-content {
    background: #f1f5f9;
    color: #334155;
    border-bottom-left-radius: 4px;
    border: 1px solid #e2e8f0;
}

.typing-indicator {
    font-style: italic;
    color: #64748b;
    font-size: 12px;
    padding: 8px 15px;
    background: #f1f5f9;
    border-radius: 15px;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    background: white;
}

#germain-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#germain-input:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

#germain-input:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

#germain-send {
    background: #1e40af;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 60px;
}

#germain-send:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
}

#germain-send:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.usage-counter {
    padding: 10px 15px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.usage-counter span {
    font-weight: 700;
    color: #1e40af;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #germain-chatbot-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    #germain-chat-window {
        width: 100%;
        height: 450px;
        max-width: none;
        margin: 0;
    }
    
    #germain-chat-button {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .germain-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .germain-text {
        display: none;
    }
}

@media (max-width: 768px) {
    #germain-chat-window {
        width: 320px;
        height: 450px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .message-content {
        border: 2px solid;
    }
    
    .user-message .message-content {
        border-color: white;
    }
    
    .germain-message .message-content {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .pulse-ring {
        animation: none;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    #germain-chat-window {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .chat-messages {
        background: linear-gradient(to bottom, #374151, #1f2937);
    }
    
    .germain-message .message-content {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .chat-input {
        background: #1f2937;
        border-color: #4b5563;
    }
    
    #germain-input {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .usage-counter {
        background: #374151;
        color: #d1d5db;
        border-color: #4b5563;
    }
}