/* Minimal custom overrides. Everything visual should come from MudBlazor. */

html, body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle hover lift for cards and table rows. */
.mud-paper.page-card {
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.page-hero {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.08) 0%, rgba(25, 118, 210, 0.02) 60%, transparent 100%);
    border: 1px solid rgba(25, 118, 210, 0.12);
    border-radius: 14px;
    padding: 20px 24px;
}

.mud-theme-dark .page-hero {
    background: linear-gradient(135deg, rgba(144, 202, 249, 0.08) 0%, rgba(144, 202, 249, 0.02) 60%, transparent 100%);
    border: 1px solid rgba(144, 202, 249, 0.14);
}

.page-hero .hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 118, 210, 0.12);
    color: #1976d2;
    flex-shrink: 0;
}

.mud-theme-dark .page-hero .hero-icon {
    background: rgba(144, 202, 249, 0.14);
    color: #90caf9;
}

.filter-card {
    border-radius: 14px !important;
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.mud-theme-dark .filter-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.content-card {
    border-radius: 14px !important;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.mud-theme-dark .content-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-hint {
    padding: 48px 24px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.empty-hint .mud-icon-root {
    font-size: 3rem;
    opacity: 0.45;
    margin-bottom: 12px;
}

.mud-table-root {
    border-radius: 0 !important;
}

.mud-table-container {
    border-radius: 0;
}

.mud-table-root tbody tr:hover {
    background-color: rgba(25, 118, 210, 0.04) !important;
}

.mud-theme-dark .mud-table-root tbody tr:hover {
    background-color: rgba(144, 202, 249, 0.06) !important;
}

.resource-type-chip {
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Initial-load spinner shown before Blazor boots. */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1976d2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Unhandled Blazor exception banner. */
#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;
}
