﻿.ringing {
    animation: ring 1s infinite;
    transform-origin: top center;
}

@keyframes ring {
    0% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-10deg);
    }

    30% {
        transform: rotate(5deg);
    }

    40% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(3deg);
    }

    60% {
        transform: rotate(-2deg);
    }

    70% {
        transform: rotate(1deg);
    }

    80% {
        transform: rotate(-1deg);
    }

    90% {
        transform: rotate(0.5deg);
    }

    100% {
        transform: rotate(0);
    }
}

.input-validation-error {
    border-color: #dc3545 !important; /* Bootstrap danger color */
}

.field-validation-error {
    color: #dc3545 !important;
}

.validation-summary-errors {
    color: #dc3545 !important;
}

.input-validation-error:focus {
    box-shadow: 0 0 0 0.25rem rgba(220,53,69,.25) !important;
}

[data-bs-theme=light] {
    --ins-border-color: #c5c5c5;
}

/* Reduce table-group-divider from Bootstrap's doubled border (2px) to a
   single border-width, matching the weight of other dividers in the app. */
.table-group-divider {
    border-top-width: var(--ins-border-width);
}

/* Slightly larger checkbox — apply to the wrapper div */
.big-check .form-check-input {
    width: 1.3rem;
    height: 1.3rem;
    cursor: pointer;
}

.big-check .form-check-label {
    line-height: 1.3rem;
    cursor: pointer;
}

.table-selected {
    /* ReSharper disable once ValueShouldHaveUnits */
    /* ReSharper disable once RequiresFallbackColor */
    --ins-table-bg-state: rgba(var(--ins-primary-rgb), 0.10); /* it just works */
}

/* Use Inspina variables so colors follow light/dark theme */
.styled-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--ins-body-color-rgb), 0.35) transparent;
}

    /* WebKit/Blink */
    .styled-scroll::-webkit-scrollbar {
        width: 6px;
        height: 8px;
    }

    .styled-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .styled-scroll::-webkit-scrollbar-thumb {
        background-color: rgba(var(--ins-body-color-rgb), 0.20);
        border-radius: 4px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }

        .styled-scroll::-webkit-scrollbar-thumb:hover {
            background-color: rgba(var(--ins-body-color-rgb), 0.35);
        }

input.form-control[readonly],
textarea.form-control[readonly] {
    color: var(--bs-secondary-color);
    opacity: 1;
    font-style: italic;
}

    input.form-control[readonly]:hover,
    textarea.form-control[readonly]:hover {
        cursor: not-allowed;
        border-color: var(--bs-border-color);
    }


/* ── Ranking / Top-5 table ──────────────────────────────────────────────── */
/* Shared by TopProducer.cshtml and the _Top_Five report module partial.    */

.ranking-table td:first-child {
    width: 2rem;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}

.ranking-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ranking-table tr.highlighted td {
    /* ReSharper disable once ValueShouldHaveUnits */
    /* ReSharper disable once RequiresFallbackColor */
    background-color: rgba(var(--ins-info-rgb), 0.15);
}

/* Button inside an input-group that should blend with the adjacent text input.
   Matches the input's border colour and body background for both themes. */
.btn-input-addon {
    border-color: var(--bs-border-color);
    background-color: var(--bs-body-bg);
}

/* Sticky table thead that covers scrolling content beneath it. */
.thead-sticky {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--ins-tertiary-bg);
}

/* Year / group separator row inside a grouped table (e.g. Loin Leaders Annual).
   Uses the same tertiary background as thead-sticky so it reads as a structural
   divider rather than a data row, and adapts correctly to light and dark themes. */
.table-group-row td {
    background-color: var(--ins-tertiary-bg);
    border-top: 2px solid var(--bs-border-color);
    font-weight: 600;
}

/* Theme-aware warning highlight for report table cells / rows.
   Use instead of inline style="background-color:var(...)" so the colour
   is defined in CSS where CSS variables are always resolved correctly. */
.cell-warn {
    background-color: #fff3cd; /* Bootstrap --bs-warning-bg-subtle (light) */
}

[data-bs-theme=dark] .cell-warn {
    background-color: #332701; /* Bootstrap --bs-warning-bg-subtle (dark)  */
}

.print-header {
    display: none;
}

/* PRINT MODE */
@media print {
    /* Keep flex so logo stays left and title stays centered */
    .print-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0;
    }

    /* Hide the spacer visually but keep its width */
    .print-header .right img {
        visibility: hidden !important;
    }
}