/* ================================
   TOAST ANIMATIONS
================================ */

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

/* ================================
   BASE BLAZOR
================================ */

html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #FFFFFF;
    color: #1E1E1E;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #007ACC;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* ================================
   BOTONES
================================ */

.btn-primary {
    color: #fff;
    background-color: #007ACC;
    border-color: #006BB3;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(0,122,204,.25);
}

/* ================================
   LAYOUT GENERAL
================================ */

.page {
    min-height: 100vh;
    background-color: #FFFFFF;
}

main {
    height: 100%;
}

.content {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* ================================
   VALIDACIÓN BLAZOR
================================ */

.valid.modified:not([type=checkbox]) {
    outline: 2px solid #22c55e;
}

.invalid {
    outline: 2px solid #ef4444;
}

.validation-message {
    color: #ef4444;
}

/* ================================
   ERROR UI BLAZOR
================================ */

#blazor-error-ui {
    color-scheme: light;
    background: #FDECEC;
    color: #B00020;
    bottom: 0;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem 0.75rem 3rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 1rem;
        top: 0.75rem;
    }

/* ================================
   ERROR BOUNDARY
================================ */

.blazor-error-boundary {
    background: #FDECEC;
    padding: 1rem 1rem 1rem 3.5rem;
    color: #B00020;
    border-radius: 0.5rem;
}

    .blazor-error-boundary::after {
        content: "Ha ocurrido un error en la aplicación.";
    }

/* ================================
   LOADING
================================ */

.loading-progress {
    position: absolute;
    display: block;
    width: 6rem;
    height: 6rem;
    inset: 30vh 0 auto 0;
    margin: auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #E5E5E5;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #007ACC;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.1s linear;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    inset: calc(30vh + 3.5rem) 0 auto 0;
    color: #616161;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Cargando…");
    }

/* ================================
   SCROLLBAR LIGHT
================================ */

* {
    scrollbar-width: thin;
    scrollbar-color: #C8C8C8 #F3F3F3;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F3F3;
}

::-webkit-scrollbar-thumb {
    background-color: #C8C8C8;
    border-radius: 4px;
}

/* ================================
   LISTA INCIDENCIAS
================================ */

.incident-item {
    transition: background-color 0.15s ease;
}

    .incident-item:hover {
        background-color: #F3F3F3;
    }

    .incident-item.active {
        background-color: #F3F3F3;
        border-left: 4px solid #007ACC;
    }

/* ================================
   ESTADOS
================================ */

.status-critical {
    color: #D13438;
}

.status-warning {
    color: #CA5010;
}

.status-ok {
    color: #107C10;
}

/* ================================
   BOTONES OPERATIVOS
================================ */

.btn-action {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Reduce fatiga visual */
section, aside {
    outline: none;
}

/* Código */
code {
    color: #C800A1;
    background: #F3F3F3;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

/* ================================
   INPUTS
================================ */

.form-floating > .form-control,
.form-floating > .form-control-plaintext {
    background-color: #FFFFFF;
    color: #1E1E1E;
    border-color: #E5E5E5;
}

    .form-floating > .form-control:focus {
        border-color: #007ACC;
    }
