/* ===== Base ===== */
html, body {
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Scrollbar minimalista ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ===== MudBlazor overrides minimalistas ===== */
.mud-drawer {
    border-right: none !important;
}

.mud-appbar {
    box-shadow: none !important;
}

.mud-nav-link {
    border-radius: 8px !important;
    margin-bottom: 2px;
    transition: background-color 0.15s ease;
}

.mud-nav-link.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
    font-weight: 600 !important;
}

.mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.mud-input-outlined .mud-input-outlined-border {
    border-radius: 8px !important;
}

/* ===== Validation styles ===== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #2ecc71;
}

.invalid {
    outline: 1px solid #e74c3c;
}

.validation-message {
    color: #e74c3c;
}

/* ===== Blazor error UI ===== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 8px;
}

.blazor-error-boundary::after {
    content: "Ha ocurrido un error.";
}

/* ===== Loading progress ===== */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

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

.loading-progress circle:last-child {
    stroke: #1565C0;
    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");
}
