/* DIN Pro web font loading */
@font-face {
    font-family: 'DIN Pro';
    src: url('fonts/dinpro-light-webfont.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Pro';
    src: url('fonts/dinpro-regular-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Pro';
    src: url('fonts/dinpro-medium-webfont.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Pro';
    src: url('fonts/dinpro-bold-webfont.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Pro';
    src: url('fonts/dinpro-black-webfont.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

html, body {
    font-family: 'DIN Pro', 'DIN', 'Segoe UI', Arial, Helvetica, sans-serif;
}

a, .btn-link {
    color: var(--mud-palette-info, #006bb7);
}

/* MudLink defaults to theme Primary (brand green). Use for standard blue underlined links. */
a.app-body-link.mud-link,
.mud-link.app-body-link {
    color: var(--mud-palette-info, #006bb7) !important;
    text-decoration: underline !important;
}

a.app-body-link.mud-link:hover,
.mud-link.app-body-link:hover {
    color: var(--mud-palette-info-darken, #004a80) !important;
}

a.app-body-link.mud-link .external-hyperlink-new-tab-icon {
    vertical-align: middle;
    margin-inline-start: 0.25rem;
}

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

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,PHN2ZyB3aWR0aD0iNTYiIG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NzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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 {
    color: var(--bs-secondary-color);
    text-align: end;
}

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

/* Ensure Bootstrap forms work correctly with MudBlazor */
.form-control, .form-select, .btn, .input-group {
    /* Reset any MudBlazor overrides that might interfere */
    box-sizing: border-box;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Shared styles for student dashboard pages */
.page-content-wrapper {
    padding: 2rem;
}

.content-box {
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    background-color: #f5f5f5;
}

.content-box-header {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.content-box-content {
    background-color: #f5f5f5;
}

/* Ensure MudBlazor input components have white backgrounds */
.content-box-content .mud-input,
.content-box-content .mud-input-root {
    background-color: #ffffff !important;
}

/* Input containers should be white by default */
.content-box-content .mud-input-control-input-container {
    background-color: #ffffff !important;
}

/* File upload containers should be transparent */
.content-box-content .mud-file-upload .mud-input-control-input-container {
    background-color: transparent !important;
}

/* Publication status cards: always one per row, full width */
.publication-status-cards {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
}

.publication-status-card {
    display: flex;
    width: 100%;
}

.publication-status-card .mud-paper {
    flex: 1;
    min-width: 0;
}

/* Limit tooltip width globally */
.mud-tooltip {
    max-width: 450px !important;
    text-align: start;
    white-space: normal;
    word-wrap: break-word;
}

/* Remove underline from dashboard brand links */
.dashboard-brand-link,
.dashboard-brand-link:link,
.dashboard-brand-link:visited,
.dashboard-brand-link:hover,
.dashboard-brand-link:focus,
.dashboard-brand-link:active,
.dashboard-brand-link.active,
.dashboard-brand-link.active:hover,
.dashboard-brand-link.active:focus,
.dashboard-brand-link.active:visited {
    text-decoration: none !important;
}

.dashboard-brand-link a,
.dashboard-brand-link.active a,
.dashboard-brand-link a:hover,
.dashboard-brand-link a:visited,
.dashboard-brand-link a:focus,
.dashboard-brand-link a:active {
    text-decoration: none !important;
}

.dashboard-brand-link .dashboard-brand,
.dashboard-brand-link .dashboard-brand-title,
.dashboard-brand-link .dashboard-brand-subtitle,
.dashboard-brand-link.active .dashboard-brand,
.dashboard-brand-link.active .dashboard-brand-title,
.dashboard-brand-link.active .dashboard-brand-subtitle {
    text-decoration: none !important;
}
