/* Noto Sans Font Family */
@font-face {
    font-family: 'Noto Sans';
    src: url('fonts/Noto/NotoSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('fonts/Noto/NotoSans-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('fonts/Noto/NotoSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('fonts/Noto/NotoSans-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

/* Judson Font Family */
@font-face {
    font-family: 'Judson';
    src: url('fonts/Judson/Judson-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Judson';
    src: url('fonts/Judson/Judson-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Judson';
    src: url('fonts/Judson/Judson-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* League Spartan Font Family */
@font-face {
    font-family: 'League Spartan';
    src: url('fonts/LeagueSpartan/static/LeagueSpartan-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'League Spartan';
    src: url('fonts/LeagueSpartan/static/LeagueSpartan-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'League Spartan';
    src: url('fonts/LeagueSpartan/static/LeagueSpartan-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

/* Sanchez Font Family */
@font-face {
    font-family: 'Sanchez';
    src: url('fonts/Sanchez/Sanchez-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Sanchez';
    src: url('fonts/Sanchez/Sanchez-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

/* Gotham Font Family */
@font-face {
    font-family: 'Gotham';
    src: url('fonts/Gotham/GothamBook.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('fonts/Gotham/GothamBookItalic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Gotham';
    src: url('fonts/Gotham/GothamMedium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('fonts/Gotham/GothamBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('fonts/Gotham/GothamLight.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* Marylebone Yellow Primary Branding Color Variables */
:root {
    --marylebone-yellow: #FAC80F;
    --marylebone-yellow-40: rgba(250, 200, 15, 0.40);
    --marylebone-yellow-50: rgba(250, 200, 15, 0.50);
    --marylebone-yellow-60: rgba(250, 200, 15, 0.60);
    --marylebone-yellow-70: rgba(250, 200, 15, 0.70);
    --marylebone-yellow-80: rgba(250, 200, 15, 0.80);
    --marylebone-yellow-90: rgba(250, 200, 15, 0.90);
    --marylebone-yellow-95: rgba(250, 200, 15, 0.95);
    --york-stone: #C39365;
    --marylebone-yellow-dark: #d4ad0d;
    --marylebone-yellow-light: #fef9e7;
    --chiltern-red-main: #A23122;
    --chiltern-red-highlight: #CA4633;
    --chiltern-red-darker: #7D1F14;
    --chiltern-red-light: #F5E6E3;
    --gardens-green-main: #0C4242;
    --gardens-green-highlight: #259390;
    --gardens-green-darker: #093232;
    --wallace-blue-main: #23335B;
    --wallace-blue-highlight: #4B6FB5;
    --wallace-blue-darker: #1A2646;
    /* Override Bootstrap color variables */
    --bs-primary: #FAC80F;
    --bs-primary-rgb: 250, 200, 15;
    --bs-success: #0C4242;
    --bs-success-rgb: 12, 66, 66;
    --bs-warning: #d4ad0d;
    --bs-warning-rgb: 212, 173, 13;
    --bs-info: #4B6FB5;
    --bs-info-rgb: 75, 111, 181;
    --bs-danger: #A23122;
    --bs-danger-rgb: 162, 49, 34;
}

/* Apply Noto Sans to the entire site and add global background */
body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-image: url('/logos/background/mainbackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Apply Judson to main titles */
h1 {
    font-family: 'Judson', Georgia, serif;
}

/* Bootstrap Component Overrides */
.bg-primary {
    background-color: var(--marylebone-yellow) !important;
}

/* Navbar with slight transparency to see background but remain readable */
.navbar.bg-primary {
    background-color: var(--marylebone-yellow-90) !important;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 1000;
}

/* Admin pages that require a solid content panel background */
.header-block {
    background-color: var(--marylebone-yellow-90);
    backdrop-filter: blur(5px);
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-top: 1rem;
    margin-bottom:1rem;
    color: black

}

.header-block-translucent {
    background-color: var(--marylebone-yellow-60);
    backdrop-filter: blur(5px);
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: black
}

/* Home dashboard widgets should sit directly on the page background */
.home-widgets-section {
    background-color: transparent !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
}

/* Ensure tables have readable backgrounds */
.table {
    background-color: rgba(255, 255, 255, 0.98);
}

.table thead th {
    background-color: rgba(243, 203, 71, 0.95) !important;
}

/* Main content area background for pages with forms/content (not home page) */
.page:not(.home-page) > main,
.page:not(.home-page) .card-body {
    /* Background handled by individual cards */
}

/* Card and content backgrounds - these create readable areas */
.card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Questionnaire cards with dynamic opacity */
.questionnaire-card {
    backdrop-filter: blur(10px);
    /* Background color set dynamically via inline style */
}

/* For pages with tables and content (admin pages, etc.) */
.container > .card,
.container-fluid > .card,
main > .container,
main > .container-fluid {
    /* Cards handle their own opacity */
}

/* Ensure table containers are readable */
.table-responsive {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.375rem;
    padding: 1rem;
}

.card-header.bg-primary {
    background-color: rgba(243, 203, 71, 0.95) !important;
}

.btn-primary {
    background-color: var(--marylebone-yellow);
    border-color: var(--marylebone-yellow);
    color: #000;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--york-stone);
    border-color: var(--york-stone);
    color: #fff;
}

.btn-primary:focus, .btn-primary:active {
    background-color: var(--marylebone-yellow-dark);
    border-color: var(--marylebone-yellow-dark);
    color: #000;
}

.btn-success {
    background-color: var(--gardens-green-main);
    border-color: var(--gardens-green-main);
}

.btn-success:hover {
    background-color: var(--gardens-green-highlight);
    border-color: var(--gardens-green-highlight);
}

.btn-success:focus, .btn-success:active {
    background-color: var(--gardens-green-darker);
    border-color: var(--gardens-green-darker);
}

.btn-warning {
    background-color: var(--marylebone-yellow);
    border-color: var(--marylebone-yellow);
    color: #000;
}

.btn-warning:hover {
    background-color: var(--york-stone);
    border-color: var(--york-stone);
    color: #fff;
}

.btn-info {
    background-color: var(--wallace-blue-highlight);
    border-color: var(--wallace-blue-highlight);
    color: #fff;
}

.btn-info:hover {
    background-color: var(--wallace-blue-main);
    border-color: var(--wallace-blue-main);
}

.btn-info:focus, .btn-info:active {
    background-color: var(--wallace-blue-darker);
    border-color: var(--wallace-blue-darker);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #fff;
}

.btn-secondary:focus, .btn-secondary:active {
    background-color: #545b62;
    border-color: #4e555b;
    color: #fff;
}

.btn-danger {
    background-color: var(--chiltern-red-main);
    border-color: var(--chiltern-red-main);
    color: #fff;
}

.btn-danger:hover {
    background-color: var(--chiltern-red-highlight);
    border-color: var(--chiltern-red-highlight);
    color: #fff;
}

.btn-danger:focus, .btn-danger:active {
    background-color: var(--chiltern-red-darker);
    border-color: var(--chiltern-red-darker);
    color: #fff;
}

.alert-info {
    background-color: var(--marylebone-yellow-light);
    border-color: var(--marylebone-yellow);
    color: var(--marylebone-yellow-dark);
}

.alert-info .bi {
    color: var(--marylebone-yellow-dark);
}

.alert-info code {
    background-color: rgba(250, 200, 15, 0.1);
    color: var(--marylebone-yellow-dark);
    border: 1px solid var(--marylebone-yellow);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

/* Mock Mode Alert with York Stone background */
.alert-mock {
    background-color: var(--york-stone);
    border-color: #a57b52;
    color: #fff;
}

.alert-mock strong,
.alert-mock .bi {
    color: #fff;
}

.alert-mock code {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.text-primary {
    color: var(--marylebone-yellow-dark) !important;
}

.text-info {
    color: var(--wallace-blue-highlight) !important;
}

.text-warning {
    color: var(--marylebone-yellow) !important;
}

.link-primary {
    color: var(--marylebone-yellow-dark) !important;
}

.link-primary:hover {
    color: var(--york-stone) !important;
}

.link-info {
    color: var(--wallace-blue-highlight) !important;
}

.link-info:hover {
    color: var(--wallace-blue-main) !important;
}

.link-warning {
    color: var(--marylebone-yellow) !important;
}

.link-warning:hover {
    color: var(--york-stone) !important;
}

.border-primary {
    border-color: var(--marylebone-yellow) !important;
}

.icon-homepage {
    color: var(--marylebone-yellow-dark);
}

/* Ensure footer is visible on home page */
body.home-page .footer {
    position: relative;
    z-index: 10;
    background-color: #f8f9fa;
}

/* Logo Styles */
.navbar-logo {
    height: 35px;
    width: auto;
    vertical-align: middle;
}

.login-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.home-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.footer-logo {
    height: 30px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.footer-logo-primary {
    height: 40px;
    width: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 28px;
    }

    .login-logo {
        max-width: 150px;
    }

    .home-logo {
        max-width: 200px;
    }

    .footer-logo {
        height: 25px;
    }

    .footer-logo-primary {
        height: 32px;
    }
}

/* Home Page Hero Section */
.home-page-background {
    /* Keep for backward compatibility but no longer needed */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/logos/background/mainbackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Navbar styling - now site-wide yellow theme */
.navbar-brand,
.nav-link {
    color: #000 !important;
}

.navbar-brand:hover,
.nav-link:hover {
    color: var(--york-stone) !important;
}

.navbar-toggler-icon {
    filter: invert(1);
}

.home-content-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: 150px;
}

.home-hero-section {
    position: relative;
    width: 100%;
    min-height: 480px;
    display: flex;
    align-items: flex-start;
    padding-top: 0;
    margin-bottom: 1rem;
}

.home-hero-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 350px;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding-top: 2rem;
    padding-bottom:3rem;
}

.hero-branding {
    text-align: right;
    color: white;
    width: 100%;
    padding-right: 50px;
}

.hero-title {
    font-family: 'League Spartan', sans-serif;
    font-size: 13.5rem;
    font-weight: 800;
    margin: 0;
    color: white;
    line-height: 1;
}

.hero-subtitle {
    font-family: 'Sanchez', serif;
    font-size: 2.8rem;
    font-weight: normal;
    margin: 0;
    margin-top: -3.0rem;
    color: white;
    text-align: right;
    letter-spacing: 0.3rem;
}

.hero-tagline {
    font-family: 'Gotham', sans-serif;
    font-size: 1.8rem;
    color: var(--marylebone-yellow);
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-weight: 300;
    text-align: right;
}

/* Transparency utility classes - 5% to 95% in 5% increments */
.transparent5 {
    opacity: 0.05;
}

.transparent10 {
    opacity: 0.1;
}

.transparent15 {
    opacity: 0.15;
}

.transparent20 {
    opacity: 0.2;
}

.transparent25 {
    opacity: 0.25;
}

.transparent30 {
    opacity: 0.3;
}

.transparent35 {
    opacity: 0.35;
}

.transparent40 {
    opacity: 0.4;
}

.transparent45 {
    opacity: 0.45;
}

.transparent50 {
    opacity: 0.5;
}

.transparent55 {
    opacity: 0.55;
}

.transparent60 {
    opacity: 0.6;
}

.transparent65 {
    opacity: 0.65;
}

.transparent70 {
    opacity: 0.7;
}

.transparent75 {
    opacity: 0.75;
}

.transparent80 {
    opacity: 0.8;
}

.transparent85 {
    opacity: 0.85;
}

.transparent90 {
    opacity: 0.9;
}

.transparent95 {
    opacity: 0.95;
}

.home-bottom-logo {
    text-align: right;
    padding: 3rem 2rem 2rem 0;
    margin-bottom: 2rem;
    scroll-margin-top: 100px;
}

.home-bottom-logo img {
    max-width: 287px;
    height: auto;
}

.home-hero-actions {
    position: absolute;
    top: 410px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.home-hero-actions .btn-outline-light:hover {
    background-color: white;
    color: var(--chiltern-red-main);
}

.home-widgets-section {
    margin-top: -50px;
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 6.9rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-tagline {
        font-size: 1.4rem;
        padding: 0 1rem;
    }

    .home-hero-banner {
        min-height: 300px;
    }

    .home-hero-actions {
        top: 400px;
    }

    .home-hero-section {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 5.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .home-hero-banner {
        min-height: 250px;
        padding: 1.5rem;
        top: 0;
    }

    .home-bottom-logo img {
        max-width: 172px;
    }

    .home-hero-actions {
        flex-direction: column;
        width: 90%;
        max-width: 300px;
        top: 270px;
    }

    .home-hero-section {
        min-height: 380px;
    }

    .home-content-wrapper {
        padding-bottom: 80px;
    }

    .hero-branding {
        padding-right: 20px;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--gardens-green-main);
}

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

.validation-message {
    color: #e50000;
}

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

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* Compliance Portal Custom Styles */

/* Widget Grid System — powered by GridStack.js in both display and edit modes */
.widgets-display-grid {
    padding: 0.5rem 0;
    transition: opacity 0.3s ease;
}

.widgets-display-grid--hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.widgets-display-grid--ready {
    visibility: visible;
    opacity: 1;
}

.widgets-loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* GridStack item content fills the full cell */
.widgets-display-grid .grid-stack-item-content {
    overflow: hidden;
}

/* widget-container fills the GridStack cell */
.widget-container {
    height: 100%;
    overflow: hidden;
    min-width: 0;
}

/* The card inside a bordered widget must fill the full cell height */
.widget-container > .card {
    height: 100%;
    overflow: hidden;
}

/* Card body scrolls vertically if content is taller than the allocated cell */
.widget-container > .card > .card-body {
    overflow-y: auto;
    min-height: 0;
}

/* Borderless widgets also fill the cell and clip overflow */
.widget-borderless {
    overflow: hidden;
}

/* Image Link Widget — height chain flows all the way to the <img> */
.widget-container:has(.image-link-widget-img) > .card > .card-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    overflow: hidden;
}

/* Widget Layout Editor */
.nav-edit-layout-btn {
    cursor: pointer;
    padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);
}

.nav-edit-layout-btn--active {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.widget-layout-editor-toolbar {
    padding: 0.4rem 0.75rem;
    background: #fff8e1;
    border: 1px dashed #f0a500;
    border-radius: 6px;
    flex-wrap: wrap;
}

.widget-preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    background: rgba(13, 110, 253, 0.75);
    border: 1px solid rgba(13, 110, 253, 0.9);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.widget-layout-editor-grid {
    background: repeating-linear-gradient(
        to right,
        rgba(0,0,0,0.03) 0px,
        rgba(0,0,0,0.03) 1px,
        transparent 1px,
        transparent calc(8.333% - 1px)
    );
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 4px;
}

.widget-editor-item {
    background: #fff;
    border: 2px solid #6c757d;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: move;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    overflow: hidden;
}

.widget-editor-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.widget-editor-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.widget-editor-dims {
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

@media (max-width: 768px) {
    .widgets-grid {
        grid-template-columns: 1fr;
    }

    .widget-container {
        grid-column: span 12 !important;
    }
}

/* Widget Specific Styles */
.welcome-widget h4 {
    color: var(--chiltern-red-main);
    margin-bottom: 1rem;
}

.stat-box {
    padding: 1rem;
}

.stat-box h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.news-widget img {
    max-height: 200px;
    object-fit: cover;
}

.custom-html-widget {
    overflow-wrap: break-word;
}

/* Document Approval Status Badge Colors */
/* Override Bootstrap's bg-warning which can appear greenish-yellow */
/* Use multiple selectors to ensure highest specificity */
.badge.bg-warning,
span.badge.bg-warning,
.rz-badge.bg-warning,
table .badge.bg-warning,
td .badge.bg-warning {
    background-color: #fd7e14 !important; /* Bootstrap orange - proper amber color */
    color: #000 !important;
}

/* Ensure danger (Rejected) is clear red */
.badge.bg-danger,
span.badge.bg-danger,
.rz-badge.bg-danger,
table .badge.bg-danger,
td .badge.bg-danger {
    background-color: var(--chiltern-red-main) !important;
    color: #fff !important;
}

/* Ensure success (Approved) is clear green */
.badge.bg-success,
span.badge.bg-success,
.rz-badge.bg-success,
table .badge.bg-success,
td .badge.bg-success {
    background-color: var(--gardens-green-main) !important;
    color: #fff !important;
}

/* Ensure secondary (Unknown) is clear gray */
.badge.bg-secondary,
span.badge.bg-secondary,
.rz-badge.bg-secondary,
table .badge.bg-secondary,
td .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Dialog Overlays for Questionnaire Management */
.questionnaire-editor-overlay,
.question-builder-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 20px;
}

/* Unit Selector Scrollable List */
.unit-selector-scrollable {
    max-height: 180px; /* Approx 4.5 items - shows scrollbar more clearly */
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem 0.5rem 0.5rem 1rem; /* More left padding to prevent checkbox cutoff */
    background-color: white;
}

.unit-selector-scrollable .form-check {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-right: 0.5rem;
    /* Keep Bootstrap's default padding-left for checkbox spacing */
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

.unit-selector-scrollable .form-check:hover {
    background-color: #f8f9fa;
}

.unit-selector-scrollable .form-check:last-child {
    margin-bottom: 0;
}

.unit-selector-scrollable .form-check-label {
    cursor: pointer;
    user-select: none;
    margin-left: 0.25rem;
}


    .questionnaire-editor-overlay > .rz-card,
    .question-builder-overlay > .rz-card {
        margin: 0;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    }

/* Radzen Dialog Title Bar Styling */
.rz-dialog-titlebar {
    background: linear-gradient(135deg, var(--marylebone-yellow) 0%, var(--marylebone-yellow-dark) 100%) !important;
    color: #000 !important;
    padding: 1rem 1.5rem !important;
    border-bottom: 3px solid var(--marylebone-yellow-dark) !important;
}

.rz-dialog-title {
    color: #000 !important;
    font-weight: 600 !important;
    font-size: 1.125rem !important;
}

.rz-dialog-titlebar-icon {
    color: #000 !important;
}

.rz-dialog-titlebar-icon:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Alternative color schemes for different dialog types */
.rz-dialog.dialog-success .rz-dialog-titlebar {
    background: linear-gradient(135deg, var(--gardens-green-main) 0%, var(--gardens-green-darker) 100%) !important;
    border-bottom: 3px solid var(--gardens-green-darker) !important;
}

.rz-dialog.dialog-warning .rz-dialog-titlebar {
    background: linear-gradient(135deg, var(--marylebone-yellow) 0%, var(--york-stone) 100%) !important;
    border-bottom: 3px solid var(--york-stone) !important;
}

.rz-dialog.dialog-danger .rz-dialog-titlebar {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%) !important;
    border-bottom: 3px solid #b02a37 !important;
}

/* Traffic Light Status Indicators */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}



.status-green {
    background-color: var(--gardens-green-main);
}

.status-amber {
    background-color: var(--marylebone-yellow);
}

.status-red {
    background-color: #dc3545;
}

.status-grey {
    background-color: #6c757d;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Code blocks in documentation */
pre code {
    display: block;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
    overflow-x: auto;
}

/* Permitted users admin styling */
.table-danger {
    background-color: rgba(220, 53, 69, 0.1);
}

.table-danger:hover {
    background-color: rgba(220, 53, 69, 0.2);
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Loading spinner center */
.spinner-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Radzen Alert Customization - Make alerts more opaque and readable */
.rz-alert {
    backdrop-filter: blur(10px);
    border-width: 2px !important;
}

/* Warning alerts - Yellow/Orange background */
.rz-alert.rz-variant-flat.rz-shade-lighter.rz-alert-warning,
.rz-alert.rz-alert-warning.rz-variant-flat.rz-shade-lighter,
.rz-alert-warning.rz-variant-flat {
    background-color: rgba(255, 193, 7, 0.95) !important; /* Brighter warning yellow */
    border-color: #ff9800 !important; /* Orange border */
    color: #663c00 !important; /* Dark brown text */
}

/* Info alerts - Light blue background */
.rz-alert.rz-variant-flat.rz-shade-lighter.rz-alert-info,
.rz-alert.rz-alert-info.rz-variant-flat.rz-shade-lighter,
.rz-alert-info.rz-variant-flat {
    background-color: rgba(217, 237, 247, 0.95) !important;
    border-color: var(--wallace-blue-main) !important;
    color: #004085 !important;
}

/* Danger alerts - Light red background */
.rz-alert.rz-variant-flat.rz-shade-lighter.rz-alert-danger,
.rz-alert.rz-alert-danger.rz-variant-flat.rz-shade-lighter,
.rz-alert-danger.rz-variant-flat {
    background-color: rgba(248, 215, 218, 0.95) !important;
    border-color: var(--chiltern-red-main) !important;
    color: #721c24 !important;
}

/* Success alerts - Light green background */
.rz-alert.rz-variant-flat.rz-shade-lighter.rz-alert-success,
.rz-alert.rz-alert-success.rz-variant-flat.rz-shade-lighter,
.rz-alert-success.rz-variant-flat {
    background-color: rgba(212, 237, 218, 0.95) !important;
    border-color: var(--gardens-green-main) !important;
    color: #155724 !important;
}

/* Ensure alert icons are visible */
.rz-alert .rz-alert-icon {
    opacity: 1 !important;
}

/* Ensure alert text is readable */
.rz-alert strong {
    font-weight: 600 !important;
}

z-alert code {
    background-color: rgba(0, 0, 0, 0.05) !important;
    padding: 0.2em 0.4em !important;
    border-radius: 0.25rem !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Document review dialog tab styles */
.document-review-container .nav-tabs .nav-link {
    border-radius: 0;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 0.85rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    height: 100%;
}

.document-review-container .nav-tabs .nav-link.active {
    background-color: #fff;
    color: #000;
    border-bottom-color: #fff;
}

.document-review-container .nav-tabs .nav-link:not(.active) {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.85);
}

.document-review-container .nav-tabs .nav-link:not(.active):hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Resources folder cards */
.resources-folder-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.resources-folder-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Resources breadcrumb */.resources-breadcrumb {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
