/* Kurdish Academy AI Chatbot Styles */

.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.toggle-icon {
    font-size: 28px;
}

.ai-indicator {
    font-size: 9px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 8px;
    position: absolute;
    bottom: 5px;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(46, 125, 50, 0.6);
}

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 16px;
}

.chatbot-icon {
    font-size: 24px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #e0e0e0;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 3px;
}

.bot-message,
.user-message {
    padding: 12px 15px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}

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

.bot-message {
    background: white;
    align-self: flex-start;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.bot-message strong {
    color: #2e7d32;
}

.user-message {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    color: white;
    align-self: flex-end;
    box-shadow: 0 2px 5px rgba(46, 125, 50, 0.3);
}

.user-message strong {
    color: rgba(255, 255, 255, 0.9);
}

.chatbot-input-container {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input:focus {
    border-color: #4caf50;
}

.chatbot-send {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.chatbot-send:active {
    transform: scale(0.98);
}

/* AI Badge */
.ai-badge {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: bold;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 15px !important;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* API Notice */
.api-notice {
    background: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    color: #856404 !important;
}

.api-notice strong {
    color: #856404 !important;
}

/* Send Icon */
.send-icon {
    font-size: 16px;
}

/* Links in messages */
.bot-message a {
    color: #2e7d32;
    text-decoration: underline;
    font-weight: bold;
}

.bot-message a:hover {
    color: #1b5e20;
}

/* Responsive design */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}
