/* ═══════════════════════════════════════════════════════════════════════════════════════
   LIMS: Application Styles

   Custom CSS for the LIMS module.
   MudBlazor handles most styling, this file is for additional customizations.
   ═══════════════════════════════════════════════════════════════════════════════════════ */

/* --- Base Styles --- */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Custom Utility Classes --- */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- DataGrid Row Click Styling --- */
.mud-table-row.cursor-pointer:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* --- Card Hover Effects --- */
.hover-elevate {
    transition: box-shadow 0.2s ease-in-out;
}

.hover-elevate:hover {
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.12);
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
    .mud-drawer-content .mud-navmenu {
        padding: 8px;
    }

    .mud-main-content {
        padding: 8px !important;
    }
}

/* --- Loading States --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* --- Form Layout Helpers --- */
.form-section {
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--mud-palette-text-secondary);
}

/* --- Error States --- */
.error-boundary {
    padding: 2rem;
    text-align: center;
    background: #ffebee;
    border-radius: 4px;
    margin: 1rem;
}

/* --- TinyMCE in MudDialog: ensure popups render above dialog overlay --- */
.tox-tinymce-aux {
    z-index: 10001 !important;
}

/* --- Rendered HTML content preview (tables, lists, etc.) --- */
.content-preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.5rem 0;
}

.content-preview table th,
.content-preview table td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: left;
}

.content-preview table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* --- Print Styles --- */
@media print {
    .mud-drawer,
    .mud-appbar,
    .no-print {
        display: none !important;
    }

    .mud-main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}
