/* ======================================================================================
   1. GLOBAL FONT + RESET
   ====================================================================================== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* ======================================================================================
   2. BLAZOR ERROR UI / LOADING UI
   ====================================================================================== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: .6rem 1rem .7rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...snipped...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* Loading indicator */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

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

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

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

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

/* ======================================================================================
   3. FORM VALIDATION
   ====================================================================================== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
    margin-top: .25rem;
    font-size: .875rem;
}

/* ======================================================================================
   4. GLOBAL ROUNDED CORNERS + SHADOW VARIABLES
   ====================================================================================== */

:root {
    --sc-radius: .5rem;
    /* NEW Shadow Strength Variables */
    --sc-shadow-light: 1; /* Increase for stronger shadow in light mode */
    --sc-shadow-dark: 1; /* Increase for stronger shadow in dark mode */
}

/* ======================================================================================
   5. COMPONENT RADIUS OVERRIDES
   ====================================================================================== */

.btn {
    border-radius: var(--sc-radius);
}

.card {
    border-radius: var(--sc-radius);
    box-shadow: 0 .15rem .3rem rgba(0,0,0,.08);
}

.table {
    border-radius: var(--sc-radius);
    overflow: hidden;
}

.form-control,
input,
select,
textarea {
    border-radius: var(--sc-radius);
}

.modal-content {
    border-radius: var(--sc-radius);
}

/* ======================================================================================
   6. ICON SYSTEM
   ====================================================================================== */
.icon-sm {
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
}

.icon-white {
    filter: brightness(0) invert(1);
}

/* ======================================================================================
   7. PAGE SPACING
   ====================================================================================== */
.content {
    padding-top: 1.1rem;
}

/* Card Title Styling - Global */
.card-title {
    font-weight: 600;
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 0;
}

/* ======================================================================================
   CARD HEADER (Improved Styling)
   ====================================================================================== */

.card-header {
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,.125);
    border-top-left-radius: var(--sc-radius);
    border-top-right-radius: var(--sc-radius);
    background-color: rgba(0, 0, 0, 0.03);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

[data-bs-theme="dark"] .card-header {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ======================================================================================
   CARD (Base)
   ====================================================================================== */

.card {
    border-radius: var(--sc-radius);
    border: none;
    transition: box-shadow .25s ease, background-color .2s ease, color .2s ease;
}

/* ======================================================================================
   CARD SHADOW (Light + Dark, Now Variable-Based)
   ====================================================================================== */

/* Light mode: uses --sc-shadow-light */
[data-bs-theme="light"] .card {
    box-shadow: 0 calc(4px * var(--sc-shadow-light)) calc(10px * var(--sc-shadow-light)) rgba(0, 0, 0, 0.20), 0 calc(8px * var(--sc-shadow-light)) calc(24px * var(--sc-shadow-light)) rgba(0, 0, 0, 0.15);
}

/* Dark mode: uses --sc-shadow-dark */
[data-bs-theme="dark"] .card {
    background-color: #1f1f1f !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    box-shadow: 0 0 calc(6px * var(--sc-shadow-dark)) rgba(255,255,255,0.25), 0 0 calc(16px * var(--sc-shadow-dark)) rgba(255,255,255,0.15) !important;
}
