/* Chat Grid Layout */
.chat-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Chat Kartı */
.chat-card {
    display: flex;
    flex-direction: column;
    min-height: 450px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Chat Header */
.chat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
    margin-bottom: 0.5rem;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    font-size: 20px;
}

.chat-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e5e7eb;
}

.chat-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

.chat-back-btn {
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: 0.2s;
}

.chat-back-btn:hover {
    background: rgba(16, 185, 129, 0.2);
}

/* Chat Body (Mesaj alanı) */
.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.8rem;
  overflow-y: auto;  /* ← Scroll bar ekle */
  max-height: 350px; /* ← Sabit yükseklik (istediğin kadar değiştirebilirsin) */
  scroll-behavior: smooth; /* ← Yumuşak scroll */
}


/* Mesajlar */
.message-row {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.bot-message .message-bubble {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 12px 12px 12px 4px;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bot-message .message-bubble p {
    margin: 0;
    margin-bottom: 0.4rem;
}

.bot-message .message-bubble p:last-child {
    margin-bottom: 0;
}

.user-message {
    margin-left: auto;
}

.user-message .message-bubble {
    background: rgba(30, 58, 138, 0.8);
    color: #e5e7eb;
    border-radius: 12px 12px 4px 12px;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.message-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.3rem;
    align-self: flex-end;
}

/* Chat Input */
.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.8rem;
    background: rgba(15, 23, 42, 0.95);
}

.chat-input-row textarea {
    flex: 1;
    resize: none;
    max-height: 80px;
    min-height: 36px;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: rgba(30, 58, 138, 0.6);
    color: #e5e7eb;
    font-size: 0.9rem;
    font-family: inherit;
}

.chat-input-row textarea:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(30, 58, 138, 0.8);
}

.chat-input-row textarea::placeholder {
    color: #6b7280;
}

/* Chat Loading */
.chat-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #10b981;
    padding: 0.6rem 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    margin: 0 0.8rem 0.8rem;
}

.spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-top-color: #10b981;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Side Info Card */
.side-info-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .chat-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .side-info-card {
        order: -1;
    }

    .message-row {
        max-width: 90%;
    }
}
/* Kontrol Paneli Stilleri */
.control-section {
    margin-bottom: 1rem;
}

.control-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
    transform: translateY(0);
}

.danger-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.danger-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-icon {
    font-size: 16px;
}

.btn-text {
    flex: 1;
}

/* İstatistik Öğeleri */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

/* Onay Dialog */
.confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.confirmation-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.confirmation-content h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.confirmation-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    gap: 10px;
}

.confirmation-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-yes {
    background: #ef4444;
    color: white;
}

.confirm-yes:hover {
    background: #dc2626;
}

.confirm-no {
    background: #e5e7eb;
    color: #333;
}

.confirm-no:hover {
    background: #d1d5db;
}

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

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