
/* ── Radzen body / layout ─────────────────────────────── */

/* the radzen layout uses flexbox — min-width:0 is CRITICAL, allows overflow */
.rz-body {
    min-width: 0;
    overflow-x: auto !important;
}


.app-content {
    min-width: 1100px;
    margin-left: 0 !important; /* stops centering */
    height: 100%;
}


/* ── Radzen data grid ─────────────────────────────────── */

/* Prevent grid column compression */
.rz-data-grid {
    min-width: max-content;
    border-radius: 5px;
}

.rz-grid-table {
    table-layout: auto !important;
}

.rz-grid-table th {
    white-space: nowrap;
}

.rz-grid-table td {
    white-space: nowrap;
}


/* ── App utility classes ──────────────────────────────── */

.app-rounded {
    border-radius: 3px;
}

.app-rounded-top {
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.app-bottom-row-spacer {
    padding-bottom: 5px;
}

.app-top-row-spacer {
    padding-top: 5px;
}

.sidebar-collapsed {
    min-width: 100px !important;
}


/* ── Responsive images ────────────────────────────────── */

.app-dashboard-logo {
    max-width: 100%;
    width: 480px;
    height: auto;
    padding-left: 6px;
}

.app-header-logo {
    height: 40px;
    width: auto;
    border-radius: 5px;
}

@media (max-width: 575px) {
    .app-header-logo {
        height: 28px;
    }
}


/* ── Mobile / Responsive ─────────────────────────────── */

/* Hide portal title text on small screens */
@media (max-width: 767px) {
    .app-header-title { display: none !important; }
}

/* Add right padding to balance sidebar left offset on mobile */
@media (max-width: 991px) {
    .app-body-content {
        padding-right: 10px !important;
    }
}

/* Allow body to scroll vertically on mobile when panels stack */
@media (max-width: 991px) {
    .app-body-content {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }
    .app-full-height-panel {
        height: auto !important;
        max-height: 80vh;
    }
    .app-panel-scroll {
        overflow-y: visible !important;
        flex: none !important;
        min-height: unset !important;
    }
}

/* Add breathing room between stacked panels on mobile */
@media (max-width: 991px) {
    .rz-col + .rz-col {
        margin-top: 1rem;
    }
}

/* DataGrids: horizontal scroll on narrow screens */
@media (max-width: 767px) {
    .rz-data-grid-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* Icon-only buttons at 1024px and below */
@media (max-width: 1024px) {
    .rz-button:has(.rz-button-icon-left) .rz-button-text {
        display: none !important;
    }
}

/* Prevent iOS auto-zoom on dropdown filter inputs */
@media (max-width: 1024px) {
    .rz-dropdown input,
    .rz-autocomplete input,
    .rz-combobox input {
        font-size: 16px !important;
    }
}


/* ── Blazor error UI ──────────────────────────────────── */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
