html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

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

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5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bGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.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: #1b6ec2;
            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");
    }

code {
    color: #c02d76;
}

/* Hide reCAPTCHA badge per Google's terms (required text displayed in footer) */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* ========================================
   INFO TOOLTIP STYLES - GLOBAL
   Modern, stylish, and theme-aware tooltips
   Used across the application for contextual help
   ======================================== */

.info-tooltip-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.info-tooltip-icon {
    color: var(--color-primary, #0078d4);
    cursor: help;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 0 transparent);
}

.info-tooltip-icon:hover {
    color: var(--color-primary-hover, #106ebe);
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 2px 4px rgba(var(--bs-primary-rgb, 0, 120, 212), 0.4));
}

.info-tooltip {
    /* IMPORTANT: Hidden by default */
    display: none;
    position: absolute;
    z-index: 1000;

    /* Theme-aware gradient background with primary color accent */
    background: linear-gradient(135deg,
        var(--color-surface, #ffffff) 0%,
        var(--color-bg-secondary, #f8f9fa) 50%,
        rgba(var(--bs-primary-rgb, 0, 120, 212), 0.03) 100%);

    /* Enhanced text styling */
    color: var(--color-text, #323130);
    font-size: 0.875rem;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.01em;

    /* Stylish border with theme color */
    border: 1px solid var(--color-border, #e5e5e5);
    border-left: 3px solid var(--color-primary, #0078d4);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;

    /* Enhanced shadow with theme color accent */
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(var(--bs-primary-rgb, 0, 120, 212), 0.15),
        -3px 0 8px -2px rgba(var(--bs-primary-rgb, 0, 120, 212), 0.2);

    /* Sizing */
    max-width: 320px;
    min-width: 280px;
    width: max-content;
    white-space: pre-line;
    word-wrap: break-word;

    /* Smooth backdrop blur for modern effect */
    backdrop-filter: blur(10px);

    /* Position below the icon by default */
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    opacity: 0;

    /* Smooth animation */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stylish tooltip arrow with shadow effect */
.info-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.5rem solid transparent;
    border-bottom-color: var(--color-border, #e5e5e5);
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.05));
}

.info-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.45rem solid transparent;
    border-bottom-color: var(--color-surface, #ffffff);
}

/* Show tooltip on hover or focus with smooth animation */
.info-tooltip-wrapper:hover .info-tooltip,
.info-tooltip-wrapper:focus-within .info-tooltip,
.info-tooltip-wrapper.active .info-tooltip {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .info-tooltip {
        max-width: 280px;
        min-width: 240px;
        font-size: 0.8125rem;
        padding: 0.875rem 1rem;

        /* On mobile, keep it below the icon but centered */
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-5px);
    }

    .info-tooltip-wrapper:hover .info-tooltip,
    .info-tooltip-wrapper:focus-within .info-tooltip,
    .info-tooltip-wrapper.active .info-tooltip {
        transform: translateX(-50%) translateY(0);
    }

    .info-tooltip::before,
    .info-tooltip::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* Extra small screens - full width tooltip with enhanced styling */
@media (max-width: 576px) {
    .info-tooltip {
        /* Keep position: absolute so it stays relative to the icon */
        position: absolute;
        left: 50%;
        right: auto;
        max-width: calc(100vw - 2rem);
        min-width: 240px;
        width: auto;
        transform: translateX(-50%) translateY(-5px);
        padding: 1rem;
    }

    .info-tooltip-wrapper:hover .info-tooltip,
    .info-tooltip-wrapper:focus-within .info-tooltip,
    .info-tooltip-wrapper.active .info-tooltip {
        transform: translateX(-50%) translateY(0);
    }

    .info-tooltip::before,
    .info-tooltip::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* Dark theme support - theme-aware styling */
[data-theme="dark"] .info-tooltip {
    background: linear-gradient(135deg,
        var(--color-surface, #2d2d2d) 0%,
        var(--color-bg-secondary, #252525) 50%,
        rgba(var(--bs-primary-rgb, 96, 205, 255), 0.08) 100%);
    border-color: var(--color-border, #3b3b3b);
    border-left-color: var(--color-primary, #60cdff);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.4),
        0 2px 4px -1px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 15px -3px rgba(var(--bs-primary-rgb, 96, 205, 255), 0.25),
        -3px 0 8px -2px rgba(var(--bs-primary-rgb, 96, 205, 255), 0.3);
}

[data-theme="dark"] .info-tooltip::before {
    border-bottom-color: var(--color-border, #3b3b3b);
}

[data-theme="dark"] .info-tooltip::after {
    border-bottom-color: var(--color-surface, #2d2d2d);
}

/* Turquoise theme support */
[data-theme="turquoise"] .info-tooltip {
    background: linear-gradient(135deg,
        var(--color-surface, #ffffff) 0%,
        var(--color-bg-secondary, #f0f9ff) 50%,
        rgba(var(--bs-primary-rgb, 6, 182, 212), 0.04) 100%);
    border-left-color: var(--color-primary, #06b6d4);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(var(--bs-primary-rgb, 6, 182, 212), 0.2),
        -3px 0 8px -2px rgba(var(--bs-primary-rgb, 6, 182, 212), 0.25);
}

/* Blue theme support */
[data-theme="blue"] .info-tooltip {
    background: linear-gradient(135deg,
        var(--color-surface, #ffffff) 0%,
        var(--color-bg-secondary, #eff6ff) 50%,
        rgba(var(--bs-primary-rgb, 59, 130, 246), 0.04) 100%);
    border-left-color: var(--color-primary, #3b82f6);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2),
        -3px 0 8px -2px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.25);
}

/* High contrast theme support */
[data-theme="high-contrast"] .info-tooltip {
    background: var(--color-surface, #000000);
    border: 2px solid var(--color-primary, #ffff00);
    border-left-width: 4px;
    box-shadow:
        0 0 0 2px var(--color-border, #ffffff),
        0 4px 8px rgba(255, 255, 255, 0.3);
}

[data-theme="high-contrast"] .info-tooltip::before {
    border-bottom-color: var(--color-primary, #ffff00);
}

[data-theme="high-contrast"] .info-tooltip::after {
    border-bottom-color: var(--color-surface, #000000);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .info-tooltip {
        border-width: 2px;
        box-shadow:
            0 4px 6px -1px rgba(0, 0, 0, 0.2),
            0 2px 4px -1px rgba(0, 0, 0, 0.1);
    }

    .info-tooltip-icon {
        font-weight: bold;
    }
}

/* Reduced motion support - respect user preferences */
@media (prefers-reduced-motion: reduce) {
    .info-tooltip-icon,
    .info-tooltip {
        transition: none;
        animation: none;
    }

    .info-tooltip-icon:hover {
        transform: none;
        filter: none;
    }

    .info-tooltip-wrapper:hover .info-tooltip,
    .info-tooltip-wrapper:focus-within .info-tooltip,
    .info-tooltip-wrapper.active .info-tooltip {
        transform: translateX(-50%);
    }
}
