/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
    transform-origin: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.chatbot-toggle.closing {
    transform: rotate(180deg);
}

.chatbot-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    animation: slideUp 0.3s ease;
}

.chatbot-modal.active {
    display: flex;
}

.chatbot-modal.closing {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-header p {
    margin: 5px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.chatbot-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.chatbot-message.user {
    align-items: flex-end;
}

.chatbot-message.bot {
    align-items: flex-start;
}

.chatbot-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.chatbot-message.user .chatbot-message-content {
    background: #6366f1;
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.chatbot-message-time {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    padding: 0 8px;
}

.chatbot-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.chatbot-disclaimer .warning-icon {
    color: #f39c12;
    font-size: 16px;
    margin-top: 2px;
}

.chatbot-typing {
    opacity: 0.7;
}

.chatbot-typing .typing-dots {
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
}

.chatbot-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chatbot-message-input::-webkit-scrollbar {
    width: 4px;
}

.chatbot-message-input::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.chatbot-message-input::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chatbot-message-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background-color: #fff;
    color: #333;
    min-height: 50px;
    max-height: 120px;
    resize: none;
    line-height: 1.4;
    overflow-y: auto;
}

.chatbot-message-input:focus {
    border-color: #6366f1;
}

.chatbot-message-input::placeholder {
    color: #999;
    opacity: 1;
}

.chatbot-send-button {
    width: 50px;
    height: 50px;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.chatbot-send-button:hover {
    background: linear-gradient(135deg, #5a5fcf 0%, #7c3aed 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.chatbot-send-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 768px) {
    .chatbot-modal {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 80px;
    }
    
    .chatbot-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-message-content {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .chatbot-modal {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .chatbot-disclaimer {
        margin: 10px 10px;
        font-size: 12px;
    }
    
    .chatbot-message-input {
        padding: 14px 18px;
        font-size: 15px;
        min-height: 45px;
    }
    
    .chatbot-send-button {
        min-width: 45px;
        max-width: 45px;
        height: 38px;
        font-size: 11px;
        padding: 6px 8px;
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    }
    
    .chatbot-send-button:hover {
        background: linear-gradient(135deg, #5a5fcf 0%, #7c3aed 100%);
        transform: scale(1.03);
        box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35);
    }
    
    .chatbot-input-container {
        padding: 12px;
    }
    
    .chatbot-input-group {
        gap: 6px;
    }
    
    /* Mobile için daha hızlı animasyon */
    .chatbot-modal {
        animation-duration: 0.25s;
    }
    
    .chatbot-modal.closing {
        animation-duration: 0.25s;
    }
}

/* Dark theme support */
[data-theme=dark] .chatbot-disclaimer {
    background-color: #2c2c2c;
    border-color: #555;
    color: #f0ad4e;
}

[data-theme=dark] .chatbot-message-input {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

[data-theme=dark] .chatbot-message-input::placeholder {
    color: #aaa;
}

.chatbot-message.new-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth buttons styling */
.chatbot-auth-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.chatbot-auth-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.chatbot-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chatbot-auth-btn.login-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.chatbot-auth-btn.login-btn:hover {
    background: linear-gradient(135deg, #5a5fcf 0%, #7c3aed 100%);
}

.chatbot-auth-btn.register-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.chatbot-auth-btn.register-btn:hover {
    background: linear-gradient(135deg, #0f9b73 0%, #047857 100%);
}

.chatbot-auth-btn i {
    font-size: 14px;
}

/* Responsive auth buttons */
@media (max-width: 480px) {
    .chatbot-auth-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .chatbot-auth-btn {
        min-width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }
}