/**
 * OpenWebUI Extension - Common Styles
 * Shared CSS styles used across multiple templates
 */

/* ===========================================
   Card Styles
   =========================================== */
.stats-card {
    margin-bottom: 20px;
}

.trend-card {
    margin-bottom: 20px;
}

/* ===========================================
   Chart Container
   =========================================== */
.chart-container {
    height: 300px;
    margin-bottom: 20px;
}

/* Model trends page uses 400px height */
.chart-container-lg {
    height: 400px;
    margin-bottom: 30px;
}

/* ===========================================
   Pagination
   =========================================== */
.pagination-container {
    margin-top: 15px;
}

/* ===========================================
   Time/Date Selectors
   =========================================== */
.time-selector {
    margin-bottom: 20px;
}

.date-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.date-input-group {
    max-width: 400px;
}

/* ===========================================
   Growth Indicators
   =========================================== */
.growth-positive {
    color: #28a745;
}

.growth-negative {
    color: #dc3545;
}

/* ===========================================
   Tag Selectors (Model/User)
   =========================================== */
.model-selector,
.user-selector {
    margin-bottom: 20px;
}

.model-tag,
.user-tag {
    margin: 2px;
    cursor: pointer;
}

.model-tag.active,
.user-tag.active {
    background-color: #007bff !important;
}

/* ===========================================
   Stats Summary
   =========================================== */
.stats-summary {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

/* ===========================================
   Log Viewer Styles
   =========================================== */
.log-table {
    font-size: 0.9rem;
}

.log-entry {
    border-left: 4px solid #007bff;
    padding-left: 10px;
    margin-bottom: 10px;
}

.log-entry.error {
    border-left-color: #dc3545;
}

.log-entry.warning {
    border-left-color: #ffc107;
}

.log-entry.success {
    border-left-color: #28a745;
}

.log-details {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
    font-family: monospace;
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
}

.log-level-badge {
    font-size: 0.7rem;
}

/* ===========================================
   Filter Section
   =========================================== */
.filter-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ===========================================
   JSON Viewer
   =========================================== */
.json-viewer {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 150px;
    overflow-y: auto;
}

/* ===========================================
   Table Responsive with Max Height
   =========================================== */
.table-responsive-scroll {
    max-height: 400px;
    overflow-y: auto;
}

.table-responsive-scroll-lg {
    max-height: 600px;
    overflow-y: auto;
}

/* ===========================================
   Toast Notifications
   =========================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

.toast-notification {
    min-width: 200px;
    margin-top: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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