
::view-transition-group(app-bar),
::view-transition-new(app-bar) {
    animation: none;
}

::view-transition-old(app-bar) {
    display: none;
}

@media (prefers-reduced-motion: no-preference) {
    html:active-view-transition-type(forward)::view-transition-old(root) {
        animation: 300ms ease both slide-to-left;
    }

    html:active-view-transition-type(forward)::view-transition-new(root) {
        animation: 300ms ease both slide-from-right;
    }

    html:active-view-transition-type(back)::view-transition-old(root) {
        animation: 300ms ease both slide-to-right;
    }

    html:active-view-transition-type(back)::view-transition-new(root) {
        animation: 300ms ease both slide-from-left;
    }
}

@keyframes slide-from-right {
    from { transform: translateX(100%); }
}

@keyframes slide-to-left {
    to { transform: translateX(-100%); }
}

@keyframes slide-from-left {
    from { transform: translateX(-100%); }
}

@keyframes slide-to-right {
    to { transform: translateX(100%); }
}

* {
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

body {
    min-height: 100vh;
    margin: 0;
    /* on body, not on a div: it propagates to the canvas, so the reserved
       scrollbar gutter is painted too instead of showing a white strip */
    background: #f1f5f9;
    color: #111111;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.assignment-detail-link {
    overflow-wrap: anywhere;
    color: #0061a2;
    text-decoration: underline;
    text-decoration-color: #8ab5d1;
    text-underline-offset: 0.25rem;
}

table {
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid black;
    padding: 5px
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

::selection {
    background: rgba(0, 97, 162, 0.16);
}

.assignment-form-card .assignment-form-control {
    width: 100%;
    min-height: 3rem;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 0.75rem 1rem;
    border: 1px solid #cfdce8;
    border-radius: 0.9rem;
    background: #ffffff;
    color: #111111;
    font: inherit;
    font-size: 16px;
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.assignment-form-card .assignment-form-control:hover {
    border-color: #cfdce8;
    box-shadow: none;
}

.assignment-form-card .assignment-form-control:focus {
    outline: none;
    border-color: #0061a2;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 97, 162, 0.12);
}

a.active {
    color: #0061a2;
}

.assignment-form-card .assignment-form-control::placeholder {
    color: #7a8ea1;
}

.assignment-form-card .assignment-form-textarea {
    min-height: 12rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    resize: vertical;
}

.assignment-form-card .assignment-form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(180deg, #ffffff 0%, #ffffff 100%),
        linear-gradient(45deg, transparent 50%, #5f7890 50%),
        linear-gradient(135deg, #5f7890 50%, transparent 50%);
    background-position:
        0 0,
        calc(100% - 1.1rem) calc(50% - 0.12rem),
        calc(100% - 0.8rem) calc(50% - 0.12rem);
    background-size:
        100% 100%,
        0.35rem 0.35rem,
        0.35rem 0.35rem;
    background-repeat: no-repeat;
    padding-right: 2.5rem;
}

.assignment-form-card .assignment-form-radio {
    accent-color: #0061a2;
}

h1:focus {
    outline: none;
}

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

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

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

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

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Shared header/action button. Global rather than scoped because pages render these
   into the layout's section outlets, where scoped selectors would not reach them. */
.app-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.app-button:hover {
    transform: translateY(-1px);
}

.app-button:focus-visible {
    outline: none;
    border-color: #0061a2;
    box-shadow: 0 0 0 4px rgba(0, 97, 162, 0.12);
}

.app-button-primary {
    background: #0061a2;
    color: #ffffff;
}

.app-button-secondary {
    border-color: #c8d6e4;
    background: #ffffff;
    color: #111111;
}

@media (max-width: 640px) {
    .app-button {
        width: auto;
        min-height: 2.35rem;
        padding: 0.6rem 0.85rem;
        border-radius: 0.8rem;
        white-space: nowrap;
    }
}

/* Page header. Every page renders its own, so these are global. */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.page-header p {
    margin: 0.3rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.page-back {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: #0061a2;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.page-back:hover {
    text-decoration: underline;
}

/* The surface page content sits on. */
.panel {
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
}

@media (max-width: 720px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .panel {
        padding: 1.1rem;
    }
}

.text-status {
    margin: 1rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ios-notifications-hint {
    max-width: 42rem;
    margin: 1rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* iOS sizes date and time inputs from their native control, not the container, so they
   overflow a narrow column unless the native appearance is switched off. Only shows up
   on a real device - desktop emulation renders these fine. */
.assignment-form-card input[type="date"],
.assignment-form-card input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
