/* ================================================
   CHATBOT STILLERI
   Homo AI-sapiens AI Asistan
   ================================================ */

/* Chatbot Baloncuk Butonu */
.chatbot-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1e293b;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(250, 204, 21, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    animation: chatBubblePulse 3s ease-in-out infinite;
}

.chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(250, 204, 21, 0.6);
}

.chatbot-bubble.active {
    animation: none;
    transform: rotate(90deg);
}

.chatbot-bubble.active:hover {
    transform: rotate(90deg) scale(1.1);
}

@keyframes chatBubblePulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(250, 204, 21, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(250, 204, 21, 0.7);
    }
}

/* Avatar içindeki logo resimleri */
.chatbot-header-avatar img,
.chatbot-sidebar-avatar img,
.chatbot-main-avatar img,
.chat-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Bildirim Noktası */
.chatbot-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #1e293b;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Sohbet Penceresi */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 520px;
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Pencere Başlığı */
.chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(234, 179, 8, 0.05));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #eab308);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chatbot-header-info {
    flex: 1;
}

.chatbot-header-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.chatbot-header-info span {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chatbot-header-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}

.chatbot-close {
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.2s;
}

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

/* Mesaj Alanı */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb,
.chatbot-main-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover,
.chatbot-main-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mesaj Balonları */
.chat-message {
    display: flex;
    gap: 8px;
    max-width: 85%;
    animation: messageSlideIn 0.3s ease;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-message.bot .chat-message-avatar {
    background: linear-gradient(135deg, #facc15, #eab308);
}

.chat-message.user .chat-message-avatar {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.chat-message-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.bot .chat-message-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    border-bottom-left-radius: 4px;
}

.chat-message.user .chat-message-bubble {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.error .chat-message-bubble {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Typing Animasyonu */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a1a1aa;
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

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

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Giriş Alanı */
.chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 16px;
    color: white;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    max-height: 80px;
    min-height: 40px;
    line-height: 1.4;
}

.chatbot-input::placeholder {
    color: #6b7280;
}

.chatbot-input:focus {
    border-color: rgba(250, 204, 21, 0.5);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1e293b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.4);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Hızlı Butonlar (İlk açılışta) */
.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chat-quick-btn {
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.25);
    color: #facc15;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.chat-quick-btn:hover {
    background: rgba(250, 204, 21, 0.2);
    border-color: rgba(250, 204, 21, 0.5);
}

/* Powered By */
.chatbot-footer {
    text-align: center;
    padding: 6px;
    font-size: 0.65rem;
    color: #4b5563;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =============================================
   TAM SAYFA CHATBOT (pages/chatbot.php)
   ============================================= */

.chatbot-fullpage {
    padding: 0;
    min-height: calc(100vh - 80px);
    max-width: 100% !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.chatbot-fullpage-container {
    display: flex;
    height: calc(100vh - 80px);
    width: 100%;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sidebar */
.chatbot-sidebar {
    width: 380px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.chatbot-sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(234, 179, 8, 0.04));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sidebar kapatma butonu — masaüstünde gizli */
.chatbot-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ddd;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-sidebar-close:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Sidebar arkasındaki karanlık overlay — masaüstünde gizli */
.chatbot-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
}

.chatbot-sidebar-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #eab308);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.chatbot-sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.chatbot-status-online {
    font-size: 0.75rem;
    color: #10b981;
}

.chatbot-status-online i {
    font-size: 0.5rem;
    margin-right: 4px;
}

/* Sidebar Sections */
.chatbot-sidebar-section {
    padding: 16px;
    flex: 1;
}

.chatbot-sidebar-section h4 {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-sidebar-section h4 i {
    color: #facc15;
}

/* Kategori Butonları */
.chatbot-category {
    margin-bottom: 6px;
}

.chatbot-category-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
}

.chatbot-category-btn i {
    color: #facc15;
    width: 20px;
    text-align: center;
}

.chatbot-category-btn:hover {
    background: rgba(250, 204, 21, 0.08);
    border-color: rgba(250, 204, 21, 0.2);
}

.chatbot-category-btn.active {
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.3);
}

/* Kategori Soruları */
.chatbot-category-questions {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 8px;
}

.chatbot-category-questions.open {
    max-height: 300px;
    padding: 8px 8px;
}

.fp-quick-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.fp-quick-btn:hover {
    background: rgba(250, 204, 21, 0.1);
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.2);
}

/* Sidebar İletişim Kartı */
.chatbot-sidebar-contact {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chatbot-sidebar-contact h4 {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-sidebar-contact h4 i {
    color: #10b981;
}

.contact-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.78rem;
    transition: all 0.2s;
    border-radius: 6px;
}

.contact-item:hover {
    color: #facc15;
    background: rgba(250, 204, 21, 0.05);
}

.contact-item i {
    width: 16px;
    text-align: center;
    color: #facc15;
    font-size: 0.85rem;
}

/* Ana Sohbet Alanı */
.chatbot-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chatbot-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.08), rgba(234, 179, 8, 0.02));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chatbot-main-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chatbot-main-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #eab308);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.chatbot-main-header-left h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
}

.chatbot-main-header-left span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.chatbot-sidebar-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.chatbot-sidebar-toggle:hover {
    background: rgba(250, 204, 21, 0.15);
}

/* Mesajlar Alanı (Fullpage) */
.chatbot-main-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

/* Input Alanı (Fullpage) */
.chatbot-main-input-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.chatbot-main-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 20px;
    color: white;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: none;
    max-height: 100px;
    min-height: 46px;
    line-height: 1.4;
}

.chatbot-main-input::placeholder {
    color: #6b7280;
}

.chatbot-main-input:focus {
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.chatbot-main-send {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1e293b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-main-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(250, 204, 21, 0.4);
}

.chatbot-main-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-main-footer {
    text-align: center;
    padding: 8px;
    font-size: 0.7rem;
    color: #4b5563;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}


/* ================================================
   FOOTER İLETİŞİM
   ================================================ */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-contact a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: #facc15;
}

.footer-contact a i {
    color: #facc15;
    font-size: 0.9rem;
}

/* =====================
   MOBİL UYUMLULUK
   ===================== */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }

    .chatbot-bubble {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
        font-size: 22px;
    }
}

@media (max-width: 640px) and (min-width: 481px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 70vh;
        border-radius: 20px 20px 0 0;
    }
}

/* Fullpage Mobil */
@media (max-width: 768px) {
    .chatbot-fullpage-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 80px);
    }

    .chatbot-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 10000;
        transition: left 0.3s ease;
    }

    .chatbot-sidebar.open {
        left: 0;
    }

    .chatbot-sidebar-close {
        display: flex;
    }

    .chatbot-sidebar-overlay.open {
        display: block;
    }

    .chatbot-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .chatbot-main {
        height: calc(100vh - 80px);
    }

    .chatbot-main-messages {
        padding: 16px;
    }

    .chatbot-main-input-area {
        padding: 12px 16px;
    }

    .footer-contact {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .footer-contact a {
        font-size: 0.75rem;
    }
}