﻿:root {
    --primary: #b31b1b;
    --primary-disabled: #6b2c2c;
    --secondary: #fb8c00;
    --secondary-disabled: #fdc57F;
    --mud-typography-default-size: 1rem;
    --mud-typography-body1-size: 1rem;
    --mud-typography-body2-size: 0.925rem;
}

/* ── Nav Drawer ─────────────────────────────────────────────────── */
.nav-drawer .mud-drawer-content {
    background-image: linear-gradient(180deg, rgba(179,27,27,1) 0%, rgba(158,91,91,1) 70%, rgba(89,30,30,1) 100%);
    color: #fff;
}

.nav-drawer .mud-drawer-header {
    background-color: rgba(179,27,27,1);
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Order table selected row highlight */
.order-row-selected td {
    background-color: rgba(179, 27, 27, 0.12) !important;
}

html {
    font-size: 16px !important;
}

html, body {
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
    font-size: 16px !important;
}

/* Normalise heading sizes — browser UA scales h5/h6 down from body,
   so pin them explicitly now Bootstrap is gone. */
h1 { font-size: 2rem;    font-weight: 500; }
h2 { font-size: 1.75rem; font-weight: 500; }
h3 { font-size: 1.5rem;  font-weight: 500; }
h4 { font-size: 1.25rem; font-weight: 500; }
h5 { font-size: 1.1rem;  font-weight: 500; }
h6 { font-size: 1rem;    font-weight: 500; }

a.links {
    color: #1565c0;
    text-decoration: none;
}

a.links:hover {
    color: #0d47a1;
    text-decoration: underline;
}

app {
    position: relative;
    display: block;
    min-height: 100vh;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Loading page */
.triangle-container {
    left: calc(-50vw + 50%);
    position: fixed;
    right: calc(-50vw + 50%);
    top: 0;
    bottom: 0;
    z-index: -1;
    background-color: #b31b1b;
}

.triangles {
    background-image: url("../images/triangles.svg");
    background-size: cover;
    height: 100%;
    bottom: 0;
    left: 0;
    mix-blend-mode: hard-light;
    position: fixed;
    right: 0;
    top: 0;
    background-position: center center;
}

.loading-container {
    position: relative;
    text-align: center;
    background-color: #fff;
    margin: 10% auto 0 auto;
    min-width: 15%;
    width: fit-content;
    max-width: 350px;
}

.loading-container-background {
    position: relative;
    text-align: center;
    background-color: #fff;
}

.loading-logo {
    width: 125px;
    margin: 10px;
}

.fadein-10 {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    animation: fadeInDelayed 0.5s ease-in 10s forwards;
}

@keyframes fadeInDelayed {
    from { opacity: 0; max-height: 0; }
    to   { opacity: 1; max-height: 200px; }
}

/* Login */
.login-container {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    align-content: center;
    margin: 5% auto 0;
    max-width: 100%;
    overflow-x: hidden;
}

    .login-container .mdc-card {
        padding: 40px 30px;
        width: 500px;
    }

    .login-container .mud-card {
        padding: 40px 30px;
        width: 460px;
    }

    .login-container .mat-accordion {
        width: 500px;
    }

    .login-container .mud-expansion-panels {
        width: 460px;
    }

.login-body {
    flex-direction: column;
    margin: 0 auto;
}

    .login-body .mat-accordion .mat-expansion-panel__header {
        flex-basis: 80%;
    }

    .login-body .mat-expansion-panel {
        background-color: #f4f4f4 !important;
    }

.logo {
    text-align: center;
}

/* app bar */
.mdc-top-app-bar__row {
    background-color: #fff;
    color: #404040;
}

.mdc-top-app-bar__section .mdc-icon-button i {
    color: var(--primary);
}

.logo-img {
    height: 42px;
}

.mdc-top-app-bar {
    box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
    color: white;
    z-index: 7 !important;
    position: sticky !important;
    top: 0;
}

.mdc-top-app-bar__title,
.mdc-top-app-bar__title a {
    color: white;
}


.sub-menu {
    visibility: hidden; /* hides sub-menu */
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    transform: translateY(-2em);
    z-index: -1;
    transition: all 0.3s ease-in-out 0s, visibility 0s linear 0.3s, z-index 0s linear 0.01s;
}

.hidden-mdc-down nav a {
    color: #E00;
    display: block;
    padding: 0.5em 1em;
    text-decoration: none;
}

    .hidden-mdc-down nav a:hover {
        color: #F55;
    }

.hidden-mdc-down nav ul,
.hidden-mdc-down nav ul li {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.hidden-mdc-down nav > ul {
    background: #EEE;
    text-align: center;
}

    .hidden-mdc-down nav > ul > li {
        display: inline-block;
        border-left: solid 1px #aaa;
    }

        .hidden-mdc-down nav > ul > li:first-child {
            border-left: none;
        }

.sub-menu {
    background: #DDD;
}

.page-footer {
    display: flex;
    flex: 0 0 auto;
    background: #fff;
    color: #4d4d4d;
    padding: 9px 12px 9px 18px;
    box-shadow: 0 0 5px 0 rgba(0,0,0,0.21);
    margin-top: 30px;
    font-size: 12px;
}

.flex-1 {
    flex: 1;
}

/*  forms */
fieldset {
    border: none;
}

hr {
    clear: both;
}

/* misc */
.contrib-card {
    padding: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .contrib-card img {
        height: 50px;
        width: 50px;
    }

.screenshot {
    text-align: center;
    display: block;
}

    .screenshot img {
        max-width: 100%;
    }

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: #fff;
    border-left: 5px solid #b31b1b;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    padding: 1rem 3rem 1rem 1rem;
    display: none;
    align-items: center;
    gap: 1rem;
    max-width: 480px;
    width: calc(100vw - 2rem);
    font-family: Roboto, sans-serif;
}

.blazor-error-icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.blazor-error-body {
    flex: 1;
}

    .blazor-error-body strong {
        display: block;
        font-size: 1rem;
        color: #1a1a1a;
        margin-bottom: 0.25rem;
    }

    .blazor-error-body p {
        font-size: 0.85rem;
        color: #555;
        margin: 0 0 0.6rem 0;
        line-height: 1.4;
    }

.blazor-error-btn {
    display: inline-block;
    background-color: #b31b1b;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

    .blazor-error-btn:hover {
        background-color: #8e1515;
    }

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.6rem;
    font-size: 0.9rem;
    color: #999;
    text-decoration: none;
    line-height: 1;
}

    #blazor-error-ui .dismiss:hover {
        color: #333;
    }

/* drawer */
.mdc-nav-li {
    list-style: none;
}

.mini .mdc-drawer,
.mini .app-sidebar {
    width: 54px;
    transition: width .4s ease-in-out;
}

    .mini .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
        margin-left: 54px;
        transition: margin-left .4s ease-in-out;
    }

.mini .drawer-profile {
    padding: 0 4px;
}

.mini .after.mdc-sub-menu-icon,
.mini .miniHover {
    transform: translateX(200%);
    animation: slide-out 1s forwards;
    transition: .4s ease-in-out;
    visibility: hidden;
    opacity: 0;
    position: fixed;
}

.mini .mdc-drawer:hover .after.mdc-sub-menu-icon,
.mini .mdc-drawer:hover .miniHover {
    transform: translateX(0%);
    animation: slide-in 1s forwards;
    transition: width .4s ease-in-out;
    visibility: visible;
    opacity: 1;
    position: relative;
}

.mini .mdc-drawer:hover .after.mdc-sub-menu-icon {
    position: absolute;
}

.mini .drawer-footer .mdc-button {
    min-width: 36px;
}

.mdc-drawer:hover,
.mdc-drawer:hover .app-sidebar,
.full .mdc-drawer,
.full .app-sidebar {
    width: 256px;
    transition: width .4s ease-in-out;
}

.closed .mdc-drawer,
.closed .app-sidebar {
    width: 0;
    transition: width .4s ease-in-out;
}

.mini .mdc-drawer:hover.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content,
.full .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
    margin-left: 256px;
    transition: margin-left .4s ease-in-out;
}

.closed .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
    margin-left: 0;
    transition: margin-left .4s ease-in-out;
}

.mdc-drawer__content {
    background-image: linear-gradient(180deg, rgba(179,27,27,1) 0%, rgba(158,91,91,1) 70%, rgba(89,30,30,1) 100%);
    color: #FFF;
}

.mdc-drawer .mdc-list-item {
    margin: 2px 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
}

.mdc-drawere .mdc-list-item:active {
    box-shadow: inset 3px 0 0 #886ab5;
}

.mdc-drawer .mdc-list-item--disabled {
    color: var(--secondary-disabled) !important;
}

.mdc-drawer a.mdc-list-item {
    padding: 0 14px !important;
}

.mdc-drawer .mdc-list-item--selected {
    border-left: solid 3px rgba(255, 255, 255, .5);
}

    .mdc-drawer .mdc-list-item--selected::before {
        opacity: 0.3 !important;
    }

.mdc-expansion-panel--selected .mat-expansion-panel__summary {
    border-left: solid 3px rgba(255, 255, 255, .3);
}

    .mdc-expansion-panel--selected .mat-expansion-panel__summary::before {
        opacity: 0.2 !important;
    }

.mat-accordion .mdc-nav-menu .mat-expansion-panel.mat-expansion-panel--expanded {
    margin: 0;
}

.drawer-logo {
    background-color: var(--primary);
    height: 64px;
    color: #fff;
}

    .drawer-logo a {
        color: #fff;
    }

.drawer-header {
}

.drawer-profile {
    padding: 4px 12px 4px 12px;
    border-bottom: solid 1px #777;
    background-size: cover;
    color: #fff;
    font-size: 12px;
    min-height: 75px;
}

@media (max-width:641px) {
    .drawer-profile {
        background-image: url("../images/profile-bg-mobile.jpg");
    }

    .drawer-profile-hidden {
        display: none !important;
    }
}

@media (min-width:641px) {
    .drawer-profile {
        background-image: url("../images/profile-bg.jpg");
    }
}

    .drawer-profile a,
    .drawer-profile .material-icons {
        color: #fff;
        vertical-align: text-bottom;
    }

.app-sidebar .material-icons {
    margin-right: 8px;
    padding-left: 7px;
}

.app-sidebar .mat-expansion-panel__content .material-icons {
    padding-left: 2px;
    margin-left: -3px;
}

.app-sidebar .mdc-nav-li .material-icons {
    margin-right: 8px;
    padding-left: 0;
}

.mdc-drawer {
    /*margin-top: 64px;*/
    box-shadow: 2px 0 5px 0 rgba(0,0,0,0.16);
}

.mdc-drawer-app-content {
    background-color: #f5f5f5;
}

.mat-drawer-container-responsive {
    display: flex;
    flex-direction: row;
}

    .mat-drawer-container-responsive .mdc-drawer {
        width: unset !important;
        position: relative;
    }

        .mat-drawer-container-responsive .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
            margin-left: unset !important;
            position: relative;
            flex: 1;
        }

.mdc-top-app-bar--fixed-adjust {
    padding-top: 0 !important;
    overflow: hidden;
}

.drawer-footer {
    position: absolute;
    text-align: left;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: solid 1px #AAA;
    font-size: 12px;
    padding: 0 12px 0 12px;
    background-color: lightgray
}

/* Small devices (landscape phones, less than 768px)*/
@media (max-width: 767.98px) {

    .drawer-profile {
        padding: 0 4px;
    }

    .login-container .mdc-card {
        padding: 20px;
        width: 300px;
    }

    .login-container .mat-accordion {
        width: 300px;
    }

    .login-container .mud-card {
        padding: 20px 16px;
        width: calc(100vw - 32px);
        box-sizing: border-box;
    }

    .login-container .mud-expansion-panels {
        width: calc(100vw - 32px);
    }

    .login-container {
        min-height: 100svh;
        margin: 0 auto;
        justify-content: center;
    }

    .loading-container {
        padding: 10px;
        width: 80%;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .loading-container {
        padding: 10px;
        width: 50%;
    }
}

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
}

/*Refresh Timer*/
div.refresh-timer.row {
    margin-left: 0;
    margin-right: 0;
    -moz-align-content: center;
    -o-align-content: center;
    -webkit-align-content: center;
    align-content: center;
    -o-justify-content: center;
    -webkit-justify-content: center;
    justify-content: center;
}

    div.refresh-timer.row div {
        -webkit-align-self: center;
        -o-align-self: center;
        align-self: center;
        margin-left: .2rem;
        margin-right: .2rem;
    }

div.refresh-timer-interval-wrapper {
    width: 100px;
}

.mdc-table-allow td:first-child {
    width: 100%;
}

.mdc-table th {
    white-space: nowrap;
}

/* Dialog */
.mud-dialog-title {
    background-color: var(--primary);
    color: white;
}
/* Style all font awesome icons */
.fa {
    padding-left: 10px;
    font-size: 30px;
    height: 30px;
    text-align: center;
    text-decoration: none;
}

    /* Add a hover effect if you want */
    .fa:hover {
        opacity: 0.7;
    }

/* Other */
.inline {
    display: inline;
}

.pull-right {
    float: right;
    padding-right: 25px;
}

/* Icon Colours*/
.icon-green {
    color: #2cb42c;
}

.icon-red {
    color: #e60000;
}

.icon-yellow {
    color: #ffa500;
}

/* -- default theme ------ */
.card-default {
    border-color: #ddd;
    background-color: #fff;
    margin-bottom: 24px;
}

    .card-default > .card-header,
    .card-default > .card-footer {
        color: #333;
        background-color: #ddd;
    }

    .card-default > .card-header {
        border-bottom: 1px solid #ddd;
        padding: 8px;
    }

    .card-default > .card-footer {
        border-top: 1px solid #ddd;
        padding: 8px;
    }

    .card-default > .card-body {
    }

    .card-default > .card-img:first-child img {
        border-radius: 6px 6px 0 0;
    }

    .card-default > .card-left {
        padding-right: 4px;
    }

    .card-default > .card-right {
        padding-left: 4px;
    }

    .card-default p:last-child {
        margin-bottom: 0;
    }

    .card-default .card-caption {
        color: #fff;
        text-align: center;
        text-transform: uppercase;
    }

/* -- item badges (used across dashboard widgets) -- */
.item {
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
    box-shadow: 0 1px 1px rgba(0,0,0,.05);
    display: block;
    width: 100%;
}

    .item * {
        padding: 5px;
    }

.item-green  { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; }
.item-red    { color: #a94442; background-color: #f2dede; border-color: #ebccd1; }
.item-yellow { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; }
.item-blue   { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; }
.item-orange { color: #a96642; background-color: #f2ebde; border-color: #ebccde; }
.item-grey   { color: #333;    background-color: #f5f5f5; border-color: #ddd; }

/* team colour pill used in Weekly Checks widget */
.title {
    font-family: inherit;
    font-weight: 500;
    font-size: large;
    line-height: 1.1;
    color: inherit;
}

.info {
    font-family: inherit;
    line-height: 1.1;
    color: inherit;
}

/* PWA Modal */
dialog.pwa-update-modal {
    border: none;
    border-radius: 4px;
    padding: 1rem 1.5rem;
    background-color: #333;
    color: #fff;
    box-shadow: 0 8px 17px 0 rgba(0,0,0,.2), 0 6px 20px 0 rgba(0,0,0,.19);
    top: 40%;
}

dialog.pwa-update-modal::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

/* Bootstrap Nav Menu */
.nav-item {
    font-size: 1rem;
    padding-bottom: 0.1rem;
    color: white;
    height: 40px;
}

    .nav-item:first-of-type {
        padding-top: 1rem;
    }

    .nav-item:last-of-type {
        padding-bottom: 1rem;
    }

    .nav-item a {
        color: #d7d7d7 !important;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
    }

        .nav-item a.active {
            background-color: rgba(255,255,255,0.25);
            color: white !important;
        }

        .nav-item a:hover {
            background-color: rgba(255,255,255,0.1);
            color: white !important;
        }

@media (min-width: 641px) {
    .position-absolute-bottom-mobile {
        position: absolute;
        bottom: 0;
    }
}

/* Fab Menu Icon */
@media (max-width: 641px) {
    .fab-mobile {
        display: none !important;
    }
}

/* Fix MudTimePicker popover going off-screen on mobile */
@media (max-width: 767px) {
    .mud-popover.mud-popover-open:has(.mud-picker) {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: calc(100vw - 32px) !important;
        max-height: calc(100vh - 32px) !important;
        overflow-y: auto;
    }
}

/* Mobile-scrollable MudTable — overrides MudBlazor's responsive stacking behaviour */
.mobile-table .mud-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.mobile-table .mud-table-head,
.mobile-table .mud-table-body {
    display: table-row-group !important;
}

.mobile-table .mud-table-head tr,
.mobile-table .mud-table-body tr {
    display: table-row !important;
}

.mobile-table .mud-table-head th,
.mobile-table .mud-table-body td {
    display: table-cell !important;
    white-space: nowrap;
}

/* Utility classes not provided by MudBlazor */
.w-100 { width: 100% !important; }
.w-50  { width: 50% !important; }
.h-100 { height: 100% !important; }
.min-vh-100 { min-height: 100vh !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-start  { text-align: start !important; }
.text-end    { text-align: end !important; }
.float-end   { float: right !important; }
.float-start { float: left !important; }