@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

body {
    font-family: 'Noto Sans SC', sans-serif;
}

#app {
    height: 100vh;
}

/* Chat Bubble Styling */
.chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.chat-bubble.customer {
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-bubble.agent {
    background-color: #3b82f6;
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-message-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.chat-message-container.agent {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-image {
    max-width: 250px;
    border-radius: 12px;
}

.chat-image[draggable="true"] {
    cursor: grab;
}
.chat-image[draggable="true"]:active {
    cursor: grabbing;
}


/* Toolkit Tab Styling */
.tab-button {
    flex: 1;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    outline: none;
    border: none;
    cursor: pointer;
}

.tab-button.active {
    background-color: white;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-button:not(.active) {
    background-color: transparent;
    color: #4b5563;
}

/* Drag and Drop Zone Highlighting */
#drop-zone.drag-over {
    background-color: #eef2ff;
    border-color: #4f46e5;
}

/* General Action Buttons */
.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    border: 1px solid #d1d5db;
    background-color: #f3f4f6;
    color: #374151;
}

.action-btn:hover {
    background-color: #e5e7eb;
}

.action-btn.action-send-btn {
    background-color: #2563eb;
    color: white;
    border-color: transparent;
}
.action-btn.action-send-btn:hover {
    background-color: #1d4ed8;
}

/* Knowledge Base Specific Styling */
.fault-type-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.fault-type-btn:hover {
    background-color: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
}

.kb-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.kb-result-item:hover {
    background-color: #f9fafb;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* View transitions for KB panel */
.view {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.view:not(.view-hidden) {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
#kb-main-view {
    position: relative; /* It should not be absolute */
}
#kb-main-view.view-hidden,
#kb-search-results-view.view-hidden,
#kb-details-view.view-hidden {
    display: none;
}
#kb-view-container > div {
    transition: opacity 0.3s ease-in-out;
}

/* Polish Modal Animations */
#polish-modal {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
#polish-modal.open {
    opacity: 1;
}
#polish-modal > div {
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
}
#polish-modal.open > div {
    transform: scale(1);
}

/* Scrollbar styling */
main.overflow-y-auto::-webkit-scrollbar,
#chat-container::-webkit-scrollbar,
.flex-1.overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}
main.overflow-y-auto::-webkit-scrollbar-track,
#chat-container::-webkit-scrollbar-track,
.flex-1.overflow-y-auto::-webkit-scrollbar-track {
  background: #f1f1f1;
}
main.overflow-y-auto::-webkit-scrollbar-thumb,
#chat-container::-webkit-scrollbar-thumb,
.flex-1.overflow-y-auto::-webkit-scrollbar-thumb {
  background: #c7c7c7;
  border-radius: 6px;
}
main.overflow-y-auto::-webkit-scrollbar-thumb:hover,
#chat-container::-webkit-scrollbar-thumb:hover,
.flex-1.overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
