/* Blazor Userscript Widget Styles */
/* These styles are scoped to the widget container */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 13px;
    background: transparent;
}

#userscript-app {
    height: 100%;
}

h1:focus {
    outline: none;
}

a {
    color: #0071c1;
}

code {
    color: #c02d76;
    background: #f4f4f4;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Hide the default Blazor error UI - we handle errors differently in userscript context */
#blazor-error-ui {
    display: none !important;
}

/* Loading indicator */
.loading-progress {
    position: absolute;
    display: block;
    width: 4rem;
    height: 4rem;
    inset: 50% 0 auto 0;
    margin: -2rem auto 0 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: #4a90d9;
    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;
    font-size: 11px;
    inset: calc(50% + 1.5rem) 0 auto 0;
}

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

/* Scrollbar styling for the widget */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

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

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