/* Itosam Arama Asistani Stilleri */

:root {
    --chatbot-primary: #1a5f7a;
    --chatbot-secondary: #159895;
    --chatbot-accent: #57c5b6;
    --chatbot-light: #f0f9ff;
    --chatbot-white: #ffffff;
    --chatbot-shadow: rgba(26, 95, 122, 0.2);
    --chatbot-text: #2c3e50;
}

/* Ana Konteyner */
#itosam-chatbot-container {
    position: fixed;
    bottom: 50px;
    right: 30px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Acma Butonu */
.chatbot-toggle-btn {
    width: 120px;
    height: 120px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    padding: 0;
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
}

.chatbot-toggle-btn:active {
    transform: scale(0.95);
}

/* Robot Ikonu */
.robot-icon {
    width: 120px;
    height: 120px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.robot-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 25px var(--chatbot-shadow));
}

/* Balon Etiket */
.chat-bubble-label {
    position: absolute;
    top: -55px;
    right: -20px;
    background: var(--chatbot-white);
    color: var(--chatbot-primary);
    padding: 11px 18px;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px var(--chatbot-shadow);
    animation: bubbleFloat 2s ease-in-out infinite;
    border: 2px solid var(--chatbot-secondary);
}

.chat-bubble-label::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--chatbot-white);
}

/* Gosterge */
.chat-bubble-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #ff4757;
    border-radius: 50%;
    border: 3px solid var(--chatbot-white);
    animation: pulse 2s ease-in-out infinite;
    display: none;
}

.chat-bubble-indicator.active {
    display: block;
}

/* Pencere */
.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 400px;
    height: 580px;
    background: var(--chatbot-white);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-window.active {
    display: flex;
}

/* Baslik */
.chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
    padding: 20px;
    color: var(--chatbot-white);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.chatbot-header-avatar {
    width: 50px;
    height: 50px;
    background: var(--chatbot-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chatbot-header-avatar img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.chatbot-header-info {
    flex: 1;
}

.chatbot-header-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.chatbot-header-status {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: var(--chatbot-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Hosgeldin Ekrani */
.search-welcome {
    padding: 30px 20px;
    text-align: center;
    flex: 1;
    overflow-y: auto;
}

.welcome-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--chatbot-shadow);
}

.welcome-avatar img {
    width: 50px;
    height: 50px;
}

.welcome-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--chatbot-primary);
    margin-bottom: 10px;
}

.welcome-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Hizli Etiketler */
.search-quick-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.search-tag {
    padding: 8px 16px;
    background: var(--chatbot-light);
    border: 2px solid var(--chatbot-secondary);
    color: var(--chatbot-primary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background: var(--chatbot-secondary);
    color: var(--chatbot-white);
    transform: translateY(-2px);
}

/* Arama Sonuc Alani */
.search-results-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: linear-gradient(to bottom, #f8fbff 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-results-area::-webkit-scrollbar {
    width: 6px;
}

.search-results-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-results-area::-webkit-scrollbar-thumb {
    background: var(--chatbot-secondary);
    border-radius: 10px;
}

/* Sonuc Basligi */
.search-results-header {
    padding: 8px 12px;
    background: var(--chatbot-light);
    border-radius: 10px;
    font-size: 13px;
    color: var(--chatbot-text);
}

.search-results-count strong {
    color: var(--chatbot-primary);
}

/* Kategori Grubu */
.search-category-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-category-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--chatbot-secondary);
    padding: 6px 4px 2px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-category-title i {
    font-size: 11px;
}

/* Sonuc Karti */
.search-result-card {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: var(--chatbot-white);
    border: 1px solid #e8edf2;
    border-radius: 12px;
    text-decoration: none;
    color: var(--chatbot-text);
    transition: all 0.25s ease;
    gap: 10px;
}

.search-result-card:hover {
    border-color: var(--chatbot-secondary);
    box-shadow: 0 4px 12px rgba(21, 152, 149, 0.12);
    transform: translateX(3px);
}

.search-card-body {
    flex: 1;
    min-width: 0;
}

.search-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--chatbot-text);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-card-snippet {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-card-arrow {
    flex-shrink: 0;
    color: #c0c7d0;
    font-size: 12px;
    transition: all 0.25s ease;
}

.search-result-card:hover .search-card-arrow {
    color: var(--chatbot-secondary);
    transform: translateX(3px);
}

/* Highlight */
.search-result-card mark,
.search-suggestion-card mark {
    background: rgba(21, 152, 149, 0.15);
    color: var(--chatbot-primary);
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
}

/* Yukleniyor */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 15px;
    color: #6b7280;
    font-size: 14px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--chatbot-light);
    border-radius: 18px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--chatbot-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Sonuc Bulunamadi */
.search-no-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px 10px;
    gap: 8px;
}

.search-no-result-icon {
    width: 60px;
    height: 60px;
    background: var(--chatbot-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.search-no-result-icon i {
    font-size: 24px;
    color: var(--chatbot-secondary);
}

.search-no-result p {
    font-size: 14px;
    color: var(--chatbot-text);
    margin: 0;
}

.search-no-result-hint {
    font-size: 13px !important;
    color: #6b7280 !important;
}

.search-suggestion-label {
    font-size: 15px !important;
    font-weight: 600;
    color: var(--chatbot-primary) !important;
    margin-top: 5px !important;
}

/* Oneri Kartlari */
.search-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 5px;
}

.search-suggestion-card {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: var(--chatbot-white);
    border: 2px dashed #d1e3f0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--chatbot-text);
    transition: all 0.25s ease;
    gap: 12px;
}

.search-suggestion-card:hover {
    border-color: var(--chatbot-secondary);
    border-style: solid;
    background: var(--chatbot-light);
    transform: translateX(3px);
}

.search-suggestion-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-suggestion-icon i {
    color: var(--chatbot-white);
    font-size: 14px;
}

.search-suggestion-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-suggestion-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--chatbot-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-cat {
    font-size: 11px;
    color: var(--chatbot-secondary);
    font-weight: 500;
}

/* Girdi Alani */
.chatbot-input-area {
    padding: 15px 20px;
    background: var(--chatbot-white);
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.chatbot-input:focus {
    border-color: var(--chatbot-secondary);
    background: var(--chatbot-white);
}

.chatbot-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
    border: none;
    color: var(--chatbot-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--chatbot-shadow);
}

/* Animasyonlar */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Responsive */
@media (max-width: 768px) {
    #itosam-chatbot-container {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-toggle-btn {
        width: 60px;
        height: 60px;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        max-height: 600px;
    }
}

@media (max-width: 480px) {
    .chatbot-window {
        bottom: 75px;
        width: calc(100vw - 20px);
        height: calc(100vh - 110px);
        max-height: none;
    }
}

/* Iletisim Bilgi Karti */
.contact-info-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f4fd 100%);
    border: 2px solid var(--chatbot-secondary);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-info-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--chatbot-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(21, 152, 149, 0.2);
}

.contact-info-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--chatbot-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.contact-info-value {
    font-size: 13px;
    color: var(--chatbot-text);
    line-height: 1.4;
}

.contact-info-link {
    font-size: 13px;
    color: var(--chatbot-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-info-link:hover {
    color: var(--chatbot-secondary);
    text-decoration: underline;
}
