/* ============================================
   Chainlit 2.8 Custom Styles
   Using Tailwind-based selectors
   ============================================ */

/* ============================================
   LAYOUT - EXPANDED WIDTH
   ============================================ */

/* Main content container - expand from default width */
.h-screen.w-screen.flex {
    max-width: 120rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============================================
   PLOTLY CHARTS - FULL WIDTH AND MORE HEIGHT
   ============================================ */

/* Plotly containers should use full available width and have more height*/
.flex.flex-col.gap-2 > [class*="max-w-"][class*="h-"]:has(> .inline-plotly.js-plotly-plot),
[data-testid*="plotly"],
[data-testid*="plot"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 750px !important;
    max-height: none !important;
}

/* Plotly-spezifische innere Container */
.inline-plotly.js-plotly-plot,
.inline-plotly.js-plotly-plot > .plot-container.plotly,
.plotly,
.js-plotly-plot {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
}


/* Optional etwas Abstand nach unten, falls Download-Buttons folgen */
.inline-plotly.js-plotly-plot {
    margin-bottom: 1rem !important;
}



/* ============================================
   TABLES - BEAUTIFUL STYLING
   ============================================ */

/* Only style tables wrapped in .table-container */
.table-container table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.table-container table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    text-align: left !important;
    font-weight: 600 !important;
}

.table-container table th,
.table-container table td {
    padding: 12px 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.table-container table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background-color 0.2s ease !important;
}

.table-container table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.table-container table tbody tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.table-container table tbody tr:last-of-type {
    border-bottom: 2px solid #667eea !important;
}

/* Scrollable table container */
.table-container {
    max-height: 600px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    margin: 1rem 0 !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Custom scrollbar for table containers */
.table-container::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
}

.table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 4px !important;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

/* ============================================
   WATERMARK CUSTOMIZATION
   ============================================ */

.watermark > a {
    display: none;
}

.watermark::before {
    content: " ";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-26%, -40%);
    background-image: url('./logo_dark.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 10em;
    height: 2.5em;
    pointer-events: none;
    opacity: 1;
    padding: 0;
    line-height: 0;
}

/* ============================================
   LOADING INDICATORS
   ============================================ */

/* Custom color for loading spinners */
.animate-spin {
    color: #667eea !important;
}
