/**
 * Feedback & AI Widget Styles
 * Geri Bildirim ve AI Asistan Widget Stilleri
 */

/* ==================== TOGGLE BUTTONS ==================== */
.widget-toggles {
    position: fixed;
    z-index: 9999;
    display: flex;
    gap: 12px;
}

.widget-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.widget-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.widget-toggle:active {
    transform: scale(0.95);
}

.widget-toggle.active {
    transform: scale(1.1);
}

/* Feedback toggle - Green gradient */
.feedback-toggle {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.feedback-toggle:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.feedback-toggle.active {
    background: linear-gradient(135deg, #1e7e34 0%, #17a085 100%);
}

/* AI toggle - Purple/Blue gradient */
.ai-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ai-toggle.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Desktop positioning */
@media (min-width: 768px) {
    .widget-toggles {
        right: 24px;
        bottom: 24px;
    }
}

/* Mobile positioning */
@media (max-width: 767px) {
    .widget-toggles {
        left: 50%;
        transform: translateX(-50%);
        bottom: 16px;
    }
}

/* ==================== WIDGET PANEL (Common) ==================== */
.feedback-widget {
    position: fixed;
    z-index: 10000;
    width: 420px;
    max-height: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.ai-widget {
    position: fixed;
    z-index: 10000;
    width: 480px;
    max-height: 580px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Desktop positioning */
@media (min-width: 768px) {

    .feedback-widget,
    .ai-widget {
        right: 24px;
        bottom: 90px;
    }
}

/* Mobile positioning */
@media (max-width: 767px) {

    .feedback-widget {
        left: 16px;
        right: 16px;
        bottom: 88px;
        width: auto;
        max-height: 70vh;
    }

    /* AI widget mobilde tam ekrana yakın */
    .ai-widget {
        left: 4px;
        right: 4px;
        bottom: 88px;
        width: auto;
        max-height: 75vh;
        border-radius: 12px;
    }
}

/* ==================== WIDGET HEADER ==================== */
.widget-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white;
}

.feedback-header-style {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.ai-header-style {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.widget-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.widget-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.widget-header-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.widget-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.widget-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* AI widget - minimize buton stili */
.ai-widget .widget-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ai-widget .widget-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* AI Header Actions Container */
.ai-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Widget Action Button (Expand) */
.widget-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.widget-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* ==================== AI WIDGET FULLSCREEN MODE ==================== */

/* Overlay backdrop */
.ai-widget-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ai-widget-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Fullscreen/Expanded mode for AI widget */
.ai-widget.ai-expanded {
    position: fixed;
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%);
    width: 90% !important;
    max-width: 960px !important;
    height: calc(100vh - 80px) !important;
    max-height: calc(100vh - 80px) !important;
    z-index: 10001;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: expandIn 0.3s ease;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Expanded mode icon change */
.ai-widget.ai-expanded .widget-action-btn i.fa-expand::before {
    content: "\f066"; /* fa-compress */
}

/* Larger content area in expanded mode */
.ai-widget.ai-expanded .ai-chat-content {
    flex: 1;
    min-height: 400px;
}

/* Larger header in expanded mode */
.ai-widget.ai-expanded .ai-header-compact {
    padding: 16px 20px;
}

.ai-widget.ai-expanded .ai-header-title {
    font-size: 17px;
}

.ai-widget.ai-expanded .ai-header-icon-small {
    width: 38px;
    height: 38px;
    font-size: 16px;
}

/* Larger messages in expanded mode */
.ai-widget.ai-expanded .message-bubble {
    font-size: 14px;
    padding: 12px 16px;
}

.ai-widget.ai-expanded .chat-message {
    max-width: 80%;
}

/* Mobile fullscreen adjustments */
@media (max-width: 767px) {
    .ai-widget.ai-expanded {
        width: calc(100% - 16px) !important;
        height: calc(100vh - 40px) !important;
        max-height: calc(100vh - 40px) !important;
        border-radius: 16px;
    }
    
    .ai-widget.ai-expanded .chat-message {
        max-width: 92%;
    }
}

/* ==================== WIDGET CONTENT ==================== */
.widget-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 200px;
}

/* ==================== WIDGET FOOTER ==================== */
.widget-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.widget-footer .btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.widget-footer .btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.widget-footer .btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ==================== FEEDBACK FORM ==================== */
.feedback-question {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.category-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cat-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    color: #555;
}

.cat-btn:hover:not(.active) {
    border-color: #28a745;
    color: #28a745;
}

.cat-btn.active {
    background: var(--matriks-base, #D94645);
    color: white;
    border-color: var(--matriks-base, #D94645);
}

/* Category specific colors */
.cat-btn[data-cat="oneri"].active {
    background: #17a2b8;
    border-color: #17a2b8;
}

.cat-btn[data-cat="sorun"].active {
    background: #dc3545;
    border-color: #dc3545;
}

.cat-btn[data-cat="diger"].active {
    background: #6c757d;
    border-color: #6c757d;
}

/* ==================== FEEDBACK ITEM (Card Style) ==================== */
.feedback-item {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feedback-item:last-child {
    margin-bottom: 0;
}

.feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--header-color, #666);
    color: white;
}

.feedback-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.feedback-item-title i {
    font-size: 14px;
}

.remove-item-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.feedback-textarea {
    animation: fadeIn 0.3s ease;
}

.feedback-textarea textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: none;
    border-radius: 0;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
    transition: box-shadow 0.2s;
}

.feedback-textarea textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #28a745;
}

.feedback-textarea textarea::placeholder {
    color: #999;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==================== ADD MORE SECTION ==================== */
.add-more-section {
    margin-top: 20px;
    padding-top: 16px;
    position: relative;
}

.add-more-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd 20%, #ddd 80%, transparent);
}

.feedback-question-small {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.category-buttons-small .cat-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* ==================== AI WIDGET STYLES ==================== */

/* AI Compact Header */
.ai-header-compact {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ai-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-header-icon-small {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.ai-header-title {
    font-size: 15px;
    font-weight: 600;
}

/* Chat Messages (WhatsApp Style) */
.ai-chat-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.chat-message {
    display: flex;
    gap: 8px;
    max-width: 92%;
}

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

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

.message-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.message-bubble {
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
}

.message-bubble p {
    margin: 0;
}

/* User message bubble (left side, purple gradient like header) */
.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border-bottom-left-radius: 4px;
}

.user-message .message-bubble p {
    color: #fff !important;
}

/* Bot message bubble (right side, slightly lighter gray) */
.bot-message .message-bubble {
    background: #f5f5f5;
    color: #333 !important;
    border-bottom-right-radius: 4px;
}

.bot-message .message-bubble p {
    color: #333 !important;
}

.bot-message .message-bubble strong {
    color: #222 !important;
}

/* Compact Suggestions */
.ai-suggestions-compact {
    margin-top: 8px;
}

.ai-suggestions-title-small {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-suggestions-title-small i {
    color: #667eea;
    font-size: 12px;
}

.ai-suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-suggestion-btn-small {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    font-size: 11px;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-suggestion-btn-small:hover {
    border-color: #667eea;
    background: #f8f9ff;
    color: #667eea;
}

.ai-suggestion-btn-small i {
    font-size: 10px;
    color: #667eea;
}

/* AI Input Footer */
.ai-input-footer {
    padding: 12px 16px;
}

.ai-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 24px;
    transition: border-color 0.2s;
}

.ai-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 6px 0;
    background: transparent;
    font-family: inherit;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.4;
    overflow-y: auto;
}

.ai-input::placeholder {
    color: #999;
}

/* Align wrapper for multi-line textarea */
.ai-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: border-color 0.2s;
}

.ai-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-action-btn:hover:not(:disabled) {
    background: #f0f0f0;
    color: #667eea;
}

.ai-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-coming-soon {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin: 8px 0 0;
}

.ai-coming-soon i {
    margin-right: 4px;
}

/* ==================== SUCCESS MESSAGE ==================== */
.feedback-success {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.3s ease;
}

.feedback-success i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 16px;
}

.feedback-success h4 {
    color: #333;
    margin-bottom: 8px;
}

.feedback-success p {
    color: #666;
    font-size: 14px;
}

/* ==================== SCROLLBAR ==================== */
.widget-content::-webkit-scrollbar {
    width: 6px;
}

.widget-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ==================== FORCE LIGHT MODE ==================== */
/* Widget'lar her zaman light mode'da görünür */
.feedback-widget,
.ai-widget {
    background: white !important;
    color: #333 !important;
}

.widget-content {
    background: white !important;
}

.widget-footer {
    background: #f8f9fa !important;
    border-color: #eee !important;
}

.feedback-question,
.feedback-question-small {
    color: #333 !important;
}

.cat-btn {
    background: white !important;
    border-color: #ddd !important;
    color: #555 !important;
}

.feedback-item {
    border-color: #e0e0e0 !important;
}

.feedback-textarea textarea {
    background: white !important;
    color: #333 !important;
}

.add-more-section::before {
    background: linear-gradient(90deg, transparent, #ddd 20%, #ddd 80%, transparent) !important;
}

/* AI Widget Light Mode */
.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
}

.user-message .message-bubble p {
    color: #fff !important;
}

.bot-message .message-bubble {
    background: #f5f5f5 !important;
    color: #333 !important;
}

.bot-message .message-bubble p {
    color: #333 !important;
}

.bot-message .message-bubble strong {
    color: #222 !important;
}

.ai-suggestions-title-small {
    color: #888 !important;
}

.ai-suggestion-btn-small {
    background: white !important;
    border-color: #e0e0e0 !important;
    color: #555 !important;
}

.ai-suggestion-btn-small:hover {
    background: #f8f9ff !important;
    border-color: #667eea !important;
    color: #667eea !important;
}

.ai-input-wrapper {
    background: white !important;
    border-color: #ddd !important;
}

.ai-input {
    color: #333 !important;
}

.ai-input::placeholder {
    color: #999 !important;
}

.ai-coming-soon {
    color: #999 !important;
}


/* ==================== TYPING INDICATOR ==================== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

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

.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.5;
    }

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

/* ==================== CHAT SUGGESTIONS ==================== */
.ai-chat-suggestions {
    margin-top: 8px;
    padding: 8px 0;
}

.suggestions-label {
    font-size: 11px;
    color: #888 !important;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.suggestions-label i {
    color: #667eea;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.suggestion-chip {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: white !important;
    cursor: pointer;
    font-size: 12px;
    color: #555 !important;
    transition: all 0.2s;
    text-align: left;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-chip:hover {
    border-color: #667eea !important;
    background: #f8f9ff !important;
    color: #667eea !important;
}

/* ==================== ERROR BUBBLE ==================== */
.error-bubble {
    background: #fff5f5 !important;
    border: 1px solid #ffcccc;
}

.error-bubble p {
    color: #cc0000 !important;
}

/* ==================== MESSAGE SOURCES ==================== */
.message-sources {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.message-sources small {
    font-size: 11px;
    color: #666 !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-sources i {
    color: #667eea;
}

/* ==================== FEEDBACK PAGE INFO ==================== */
.feedback-page-info {
    font-size: 11px;
    color: #888 !important;
    margin-top: 12px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #28a745;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.feedback-page-info i {
    color: #28a745;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ==================== COPYABLE EMAIL ==================== */
.copyable-email {
    position: relative;
    display: inline;
    background: transparent;
    color: #667eea !important;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    border-bottom: 1px dashed #667eea;
}

.copyable-email:hover {
    color: #5a6fd6 !important;
    border-bottom-style: solid;
}

.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 1000;
    animation: tooltipFadeIn 0.2s ease;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==================== AI LINK ==================== */
.ai-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #764ba2 !important;
    text-decoration: none;
    border-bottom: 1px dashed #764ba2;
    transition: all 0.2s;
    font-weight: 500;
}

.ai-link:hover {
    color: #667eea !important;
    border-bottom-color: #667eea;
    border-bottom-style: solid;
}

.ai-link i {
    font-size: 9px;
    opacity: 0.7;
}

.ai-link:hover i {
    opacity: 1;
}


/* ==================== STREAMING MESSAGE ==================== */
.streaming-message .message-bubble {
    position: relative;
}

.streaming-message .streaming-content {
    margin: 0;
    min-height: 1em;
}

.streaming-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #667eea;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Typing status in streaming */
.typing-status {
    font-style: italic;
    color: #888 !important;
    font-size: 12px;
}

/* Streaming message smooth appearance */
.streaming-message {
    animation: streamFadeIn 0.2s ease;
}

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

/* Disabled state for input during streaming */
.ai-input:disabled,
.ai-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-input:disabled::placeholder {
    color: #bbb !important;
}

/* ==================== AI MARKDOWN ELEMENTS ==================== */

/* Başlıklar */
.message-bubble .ai-heading {
    margin: 12px 0 8px 0;
    font-weight: 600;
    color: #333 !important;
    line-height: 1.3;
}

.message-bubble h2.ai-heading {
    font-size: 16px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 6px;
}

.message-bubble h3.ai-heading {
    font-size: 14px;
}

.message-bubble h4.ai-heading {
    font-size: 13px;
    color: #555 !important;
}

/* Tablolar */
.message-bubble .ai-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.message-bubble .ai-table thead {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.message-bubble .ai-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #333 !important;
    border-bottom: 2px solid #667eea40;
}

.message-bubble .ai-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #555 !important;
}

.message-bubble .ai-table tbody tr:hover {
    background: #f8f9ff;
}

.message-bubble .ai-table tbody tr:last-child td {
    border-bottom: none;
}

/* Listeler */
.message-bubble .ai-list,
.message-bubble .ai-list-ordered {
    margin: 8px 0;
    padding-left: 20px;
}

.message-bubble .ai-list {
    list-style-type: disc;
}

.message-bubble .ai-list-ordered {
    list-style-type: decimal;
}

.message-bubble .ai-list-item,
.message-bubble .ai-list-item-ordered {
    margin: 4px 0;
    padding-left: 4px;
    color: #444 !important;
    line-height: 1.5;
}

.message-bubble .ai-list-item::marker {
    color: #667eea;
}

.message-bubble .ai-list-item-ordered::marker {
    color: #764ba2;
    font-weight: 600;
}

/* Kod */
.message-bubble .ai-inline-code {
    background: #f0f0f0;
    color: #d63384 !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
}

.message-bubble .ai-code-block {
    background: #282c34;
    color: #abb2bf !important;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
}

.message-bubble .ai-code-block code {
    background: none;
    color: inherit !important;
    padding: 0;
}

/* ==================== COPYABLE CONTACT ELEMENTS ==================== */

/* Genel kopyalanabilir element stili */
.message-bubble .ai-copyable {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
}

.message-bubble .ai-copyable i {
    font-size: 10px;
    opacity: 0.8;
}

/* E-posta - Mor tema */
.message-bubble .ai-copyable-email {
    color: #667eea !important;
}

/* Web sitesi - Mavi tema */
.message-bubble .ai-copyable-url {
    color: #17a2b8 !important;
}


/* Telefon - Yeşil tema */
.message-bubble .ai-copyable-phone {
    color: #28a745 !important;
}

/* Kopyalama tooltip */
.ai-copy-tooltip {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    z-index: 99999;
    white-space: nowrap;
    animation: tooltipFadeIn 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-copy-tooltip i {
    font-size: 11px;
}

.ai-copy-tooltip.fade-out {
    animation: tooltipFadeOut 0.3s ease forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes tooltipFadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
}
