/* ASF Etiket Chatbot Stilleri */

/* Chatbot Butonu */
#asf-chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 140px;
    height: 60px;
    background: linear-gradient(135deg, #1b00c6, #2d1bff);
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(27, 0, 198, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

#asf-chatbot-button:hover {
    transform: translateY(-2px);
}

#asf-chatbot-button:hover .chatbot-icon {
    animation: bounce 0.6s ease-in-out;
}

#asf-chatbot-button:hover .chatbot-text {
    animation: pulse 0.8s ease-in-out;
}

#asf-chatbot-button.active {
    background: linear-gradient(135deg, #00b894, #00a085);
    transform: scale(0.95);
}

.chatbot-icon {
    transition: all 0.3s ease;
}

.chatbot-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-left: 8px;
    opacity: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Chatbot Modal */
#asf-chatbot-modal {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 500px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#asf-chatbot-modal.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #1b00c6, #2d1bff);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
}

.chatbot-avatar {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
}

.chatbot-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
}

.chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

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

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.2s ease;
    font-size: 18px;
    font-weight: bold;
    opacity: 1;
}

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

/* Mesajlar Alanı */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #1b00c6, #2d1bff);
    color: white;
    border-bottom-right-radius: 5px;
}

.chatbot-message.bot .message-content {
    background: white;
    color: #333;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 5px;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    display: block;
    margin-top: 4px;
}

/* Input Alanı */
.chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.chatbot-input-container {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 25px;
    padding: 8px 15px;
    transition: all 0.2s ease;
}

.chatbot-input-container:focus-within {
    background: #e2e8f0;
    box-shadow: 0 0 0 3px rgba(27, 0, 198, 0.1);
}

#asf-chatbot-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    color: #333;
}

#asf-chatbot-input::placeholder {
    color: #94a3b8;
}

#asf-chatbot-send {
    background: linear-gradient(135deg, #1b00c6, #2d1bff);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 10px;
}

#asf-chatbot-send:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(27, 0, 198, 0.3);
}

#asf-chatbot-send:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Öneri Butonları */
.chatbot-suggestions {
    display: flex;
    flex-wrap: nowrap; /* Butonların alt satıra kaymasını engeller */
    gap: 8px;
    padding-bottom: 12px; /* padding-top'ı padding-bottom olarak değiştirdik */
    justify-content: flex-start;
    overflow-x: auto; /* Yatayda taşan içerik için kaydırma çubuğu ekler */
    -webkit-overflow-scrolling: touch; /* iOS için akıcı kaydırma sağlar */
    scrollbar-width: none; /* Firefox için kaydırma çubuğunu gizler */
}

/* Chrome, Safari ve Opera için kaydırma çubuğunu gizler */
.chatbot-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestion-btn {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #374151;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap; /* Buton içindeki metnin alt satıra kaymasını engeller */
}

.suggestion-btn:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

/* Yeni Typing Indicator Stilleri */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 8px 0; /* Dikeyde ortalamak için padding */
    color: #64748b; /* Metin rengi */
}

.typing-dots {
    display: flex;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    margin-right: 4px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

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

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

.typing-text {
    font-size: 13px;
    margin-left: 8px;
}

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

/* Scrollbar Stilleri */
.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    #asf-chatbot-modal {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 90px;
        right: 20px;
        left: 20px;
    }
    
    #asf-chatbot-button {
        bottom: 15px;
        right: 15px;
        width: 120px;
        height: 55px;
        border-radius: 27px;
    }
    
    #asf-chatbot-button:hover {
        width: 120px;
        border-radius: 27px;
    }
    
    #asf-chatbot-button:hover .chatbot-icon {
        animation: bounce 0.6s ease-in-out;
    }
    
    #asf-chatbot-button:hover .chatbot-text {
        animation: pulse 0.8s ease-in-out;
    }
    
    #asf-chatbot-button .chatbot-text {
        opacity: 1;
        font-size: 13px;
    }
    
    .message-content {
        max-width: 85%;
    }

    .suggestion-btn {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #asf-chatbot-modal {
        width: calc(100vw - 20px);
        height: 75vh;
        bottom: 80px;
        right: 10px;
        left: 10px;
    }
    
    #asf-chatbot-button {
        bottom: 10px;
        right: 10px;
        width: 110px;
        height: 50px;
        border-radius: 25px;
    }
    
    #asf-chatbot-button:hover {
    }
    
    #asf-chatbot-button:hover .chatbot-icon {
        animation: bounce 0.6s ease-in-out;
    }
    
    #asf-chatbot-button:hover .chatbot-text {
        animation: pulse 0.8s ease-in-out;
    }
    
    #asf-chatbot-button .chatbot-text {
        opacity: 1;
        font-size: 12px;
    }
    
    .chatbot-messages {
        padding: 15px;
    }
    
    .chatbot-input-area {
        padding: 12px 15px;
    }

    .suggestion-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* Animasyonlar */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    80% {
        transform: translateY(-4px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.chatbot-message {
    animation: fadeIn 0.3s ease;
}

/* Tema Uyumluluğu */
.chatbot-message.bot .message-content {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chatbot-input-container {
    border: 1px solid #e2e8f0;
}

/* Hover Efektleri */
.chatbot-message.bot .message-content:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* İletişim Butonları Stilleri */
.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    margin: 4px 6px 4px 0;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contact-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Telefon Butonu */
.phone-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.phone-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.phone-btn svg {
    animation: ring 2s ease-in-out infinite;
}

/* Adres Butonu */
.address-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.address-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.address-btn svg {
    animation: bounce 2s ease-in-out infinite;
}

/* Animasyonlar */
@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Chatbot Overlay Stili */
#asf-chatbot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Chatbot modalından (999) bir düşük */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#asf-chatbot-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Arka plan kaymasını engellemek için */
body.asf-chatbot-body-noscroll {
    overflow: hidden;
}

/* Responsive Tasarım */
@media (max-width: 480px) {
    .contact-btn {
        padding: 4px 8px;
        font-size: 11px;
        margin: 2px 4px 2px 0;
    }
    
    .contact-btn svg {
        width: 12px;
        height: 12px;
    }
}