/* Custom Styles for AI + GGB Fusion */

/* GGB Container Styles */
#ggb-container {
    min-height: 400px;
    background-color: #f8f9fa;
    position: relative;
    width: 100% !important;
    height: 100% !important;
}

.app-nav-item {
    color: #64748b;
    transition: all 0.2s;
}

.app-nav-item:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.app-nav-item.active {
    background-color: #eff6ff;
    color: #2563eb;
}

/* Chat Styles */
#chat-messages {
    background-color: #fcfcfd;
}

.message-appear {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scrollbar Styles */
#chat-messages::-webkit-scrollbar {
    width: 4px;
}
#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#chat-messages::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Helper classes for layout fixing */
.min-width-0 {
    min-width: 0;
}

.assistant-content pre {
    max-width: 100%;
    overflow-x: auto;
}

.assistant-content code {
    white-space: pre-wrap;
    word-break: break-all;
}


/* GGB specific overrides */
canvas {
    outline: none !important;
}

#ggb-container iframe {
    border: none !important;
}

/* Custom Modal Animation */
#confirm-modal.active #confirm-modal-content {
    transform: scale(1);
    opacity: 1;
}

#confirm-modal.active .bg-gray-900\/40 {
    opacity: 1;
}

/* Login & Activation Modal Animation */
#login-modal-content, #activation-modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#login-modal-content.scale-100, #activation-modal-content.scale-100 {
    transform: scale(1);
    opacity: 1;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toast {
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-success {
    color: #10b981;
    background: #f0fdf4;
    border: 1px solid #bcf0da;
}

.toast-error {
    color: #ef4444;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.toast-info {
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #dbeafe;
}

.toast.hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-100%); }
}
