﻿/* --- Global Theme & Base Variables --- */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

:root {
    --sidebar-width: 230px;
}

/* --- Typography & Base Element Styling --- */
h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071bc;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e32127;
}

.validation-message {
    color: #a94442;
}

/* --- Layout Architecture (Flexbox structure) --- */
#wrapper {
    display: flex;
}

/* Top status bar/nav section */
.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row ::deep a, .top-row ::deep .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

        .top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
            text-decoration: underline;
        }

        .top-row ::deep a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

/* --- Error UI Handling (Blazor Default Overlay) --- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 4px 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.75rem;
    }

/* --- Responsive Adaptations (Desktop vs Mobile) --- */
@media (max-width: 640.98px) {
    .top-row {
        justify-content: space-between;
    }

        .top-row ::deep a, .top-row ::deep .btn-link {
            margin-left: 0;
        }
}

@media (min-width: 641px) {
    #wrapper {
        flex-direction: row;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

        .top-row ::deep a, .top-row ::deep .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

    main {
        flex: 1;
    }

    .sidebar {
        width: var(--sidebar-width);
        height: 100vh;
        position: sticky;
        top: 0;
    }
}
