@import url('open.iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
}

#app {
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
}

/* In index.html the loader CSS centers #app children; override so layouts fill the viewport. */
/* Only stretch the real app layout containers (not the initial loading wrapper). */
#app > .page,
#app > .page-fullscreen {
    width: 100%;
}

body {
    background-color: #000;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    transition: background 0.2s ease, opacity 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

*::-webkit-scrollbar-track {
    background: transparent;
}

.layout-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.layout-sidebar .nav-link:hover,
.layout-sidebar .nav-link:focus-visible {
    color: #62e4ff !important;
}

.layout-sidebar .nav-link.active {
    color: #62e4ff !important;
    font-weight: 600 !important;
}

.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;
}

.loading-progress-wrapper {
    position: relative;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress {
    display: block;
    width: 100%;
    height: 100%;
}

    .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;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.loading-progress-fallback {
    display: none;
}

/* PWA install banner (only shown in browser tabs) */
.install-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1100;
    width: auto;
    max-width: min(92vw, 360px);
}

.install-banner-button {
    width: auto;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 21px;
    border: 1px solid rgba(98, 228, 255, 0.35);
    background: rgba(0, 0, 0, 0.72);
    color: rgba(223, 238, 242, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: border-color 220ms ease, color 220ms ease, background-color 320ms ease, box-shadow 320ms ease;
}

.install-banner-button:hover,
.install-banner-button:focus-visible {
    border-color: rgba(98, 228, 255, 0.65);
    color: rgba(223, 238, 242, 0.95);
}

.install-banner-appicon {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    flex: 0 0 auto;
}

.install-banner-text {
    display: inline-block;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.15px;
    white-space: nowrap;
    overflow: hidden;
    max-width: 220px;
    opacity: 2;
    margin-right: 0.5rem;
    transform-origin: left center;
    transform: scaleX(1);
    transition:
        max-width 520ms cubic-bezier(0.2, 0.9, 0.2, 1),
        opacity 320ms ease,
        transform 520ms cubic-bezier(0.2, 0.9, 0.2, 1),
        margin-right 520ms cubic-bezier(0.2, 0.9, 0.2, 1);
    will-change: max-width, opacity, transform;
}

.install-banner-downloadicon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    max-width: 0;
    opacity: 0;
    margin-right: 0;
    transform: translateX(-4px) scale(0.96);
    transition:
        max-width 520ms cubic-bezier(0.2, 0.9, 0.2, 1),
        opacity 320ms ease,
        transform 520ms cubic-bezier(0.2, 0.9, 0.2, 1),
        margin-right 520ms cubic-bezier(0.2, 0.9, 0.2, 1);
    will-change: max-width, opacity, transform;
}

.install-banner.collapsed .install-banner-text {
    max-width: 0;
    opacity: 0;
    margin-right: 0;
    transform: scaleX(0.92);
}

.install-banner.collapsed .install-banner-downloadicon {
    opacity: 1;
    max-width: 18px;
    margin-right: 0.5rem;
    transform: translateX(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .install-banner-button,
    .install-banner-text,
    .install-banner-downloadicon {
        transition: none !important;
    }
}

@media (max-width: 480px) {
    .install-banner {
        bottom: 0.75rem;
        right: 0.75rem;
        max-width: min(94vw, 360px);
    }

    .install-banner-button {
        padding: 0.5rem 0.6rem;
    }
}
