/* ============================================================
   KrakDBench Global Responsive Styles
   ============================================================ */

/* Smooth transitions for theme changes */
body, .card, .modal-content, .navbar, .offcanvas, .btn {
    transition: background-color 0.3s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Card consistency */
.card {
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.card-header {
    border-bottom: none;
    font-weight: 600;
    padding: 1rem 1.25rem;
    background-color: var(--bs-tertiary-bg);
}

/* Make tables scrollable horizontally on small screens */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* Stats cards (used in dashboard etc.) */
.stat-card {
    background: var(--bs-body-bg);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--bs-border-color);
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Loading skeletons */
.skeleton {
    background: linear-gradient(90deg, var(--bs-tertiary-bg) 25%, var(--bs-secondary-bg) 50%, var(--bs-tertiary-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive font scaling */
html { font-size: 16px; }
@media (max-width: 768px) {
    html { font-size: 14px; }
    .card-header { padding: 0.75rem 1rem; }
    .card-body { padding: 1rem; }
    #page-content-wrapper { padding: 0.75rem !important; }
    .stat-card { margin-bottom: 1rem; }
}

/* Fix the offcanvas sidebar width on mobile */
.offcanvas-start { width: 280px !important; }

/* AI Chat sidebar responsiveness */
@media (max-width: 576px) {
    #aiChatSidebar {
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        bottom: 0 !important;
    }
}


/* Limit Exceeded Modal */
.limit-exceeded-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}
.limit-exceeded-modal .modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}
.limit-exceeded-modal .modal-content h3 {
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 1.3rem;
}
.limit-exceeded-modal .modal-content p {
    color: #64748b;
    margin-bottom: 16px;
}
.limit-exceeded-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.limit-exceeded-modal .modal-actions button {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.limit-exceeded-modal .modal-actions button:hover {
    background: #f1f5f9;
}
.limit-exceeded-modal .modal-actions .btn-upgrade {
    padding: 10px 20px;
    background: #4f46e5;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.limit-exceeded-modal .modal-actions .btn-upgrade:hover {
    background: #3730a3;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


.bg-gradient-success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important; }
.bg-gradient-danger  { background: linear-gradient(135deg, #f56565 0%, #c53030 100%) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }
.bg-gradient-warning { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important; }