﻿/* =============================================================================
   Landing Web site styles
   1. Brand palette and theme variables
   2. Page layout
   3. Links and focus
   4. Telerik overrides
   5. Landing components
   6. Page-specific styles
   7. Blazor defaults
   ============================================================================= */

/* ---- 1. Brand palette and theme variables ----
   Digital crimson for all web/screen use. Gold and sky are accents only
   (max ~2% of a layout) and must never be used for text on light backgrounds. */
:root {
    --ouf-crimson: #841617;
    --ouf-gold: #FEC553;
    --ouf-sky: #2EBEEF;
    --ouf-black: #041019;
    --ouf-gray-dark: #64696F;
    --ouf-gray: #B6B9BF;
    --ouf-gray-light: #E2E3E7;
    --ouf-white: #ffffff;
    --ouf-page-bg: #f7f6f7;
    --ouf-error: #C12E27;
    /* Original app title color, kept across OUF apps although it isn't in the brand guide */
    --ouf-title: #9595D2;
    /* The theme sets its error color to crimson; errors must not look like branded content */
    --kendo-color-error: var(--ouf-error);
}

/* ---- 2. Page layout ---- */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Lato,'Helvetica Neue',Helvetica,Arial,sans-serif;
    color: var(--ouf-black);
    background: var(--ouf-page-bg);
}

.header {
    background: var(--ouf-white);
    border-bottom-color: var(--ouf-gray-light) !important;
}

.content {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
    background: var(--ouf-white);
    border-top-color: var(--ouf-gray-light) !important;
    color: var(--ouf-gray-dark);
}

.title-caption {
    font-weight: 300;
    font-style: normal;
    color: var(--ouf-title);
    font-size: 2rem;
}

.subTitle-caption {
    color: var(--ouf-crimson);
    font-weight: bold;
    font-size: 1.1rem;
}

@media(max-width:767px) {
    .title-caption {
        font-size: 1.5rem;
    }

    .subTitle-caption {
        font-size: .9em;
    }
}

@media(min-width:1200px) {
    .title-caption {
        font-size: 1.875em;
    }

    .subTitle-caption {
        font-size: 1.1em;
    }
}

.loading-panel-wrapper {
    width: 100%;
    height: 100%;
    min-height: 200px;
    position: fixed;
    z-index: 123456;
    /* one way center the loading indicator inside */
    display: flex;
    justify-content: center;
    align-items: center;
}

    .loading-panel-wrapper .loading-panel-overlay {
        background: gray;
        position: fixed;
        width: 100%;
        height: 100% !important;
        opacity: 0.5;
    }

    .loading-panel-wrapper .k-loader {
        position: fixed !important;
        top: calc(50% - 64px);
        left: calc(50% - 64px);
    }

/* ---- 3. Links and focus ---- */
a {
    text-decoration: none !important;
    color: var(--ouf-crimson) !important;
    font-weight: 500;
}

    a:focus, a:hover {
        color: var(--ouf-crimson);
    }

    a.k-link:focus,
    a.navbar-brand:focus {
        outline: none;
    }

.nav-link {
    box-shadow: none !important;
}

.header-links .nav-link {
    white-space: nowrap;
}

button:focus {
    outline: 1px dotted;
    outline: 5px auto var(--ouf-gold);
}

/* ---- 4. Telerik overrides ---- */

/* Theme focus uses the primary color (crimson), which reads as an error; use a neutral instead.
   Invalid inputs keep the theme's error border and halo. */
.k-input:not(.k-invalid):focus-within,
.k-input.k-focus:not(.k-invalid),
.k-picker:not(.k-invalid):focus-within,
.k-picker.k-focus:not(.k-invalid) {
    border-color: var(--ouf-gray-dark) !important;
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--ouf-gray-dark) 20%, transparent) !important;
}

.k-notification-group {
    z-index: 1001;
    max-width: 350px;
    margin: 1rem;
}

.k-notification {
    max-width: 350px !important;
    min-width: 350px !important;
}

.k-notification-group .k-notification-content {
    font-size: 1rem;
    font-weight: 600;
}

.k-notification-group .k-notification-status {
    --kendo-icon-size: 1.8rem;
}

.k-notification-group .k-notification-actions {
    display: none;
}

.k-notification-error {
    background-color: var(--ouf-error) !important;
    border-color: var(--ouf-error) !important;
    color: var(--ouf-white) !important;
}

.k-window {
    box-shadow: 1px 1px 7px 1px rgba(128, 128, 128, .3);
}

.k-window-titlebar {
    background-position: 50% 50%;
    background-color: var(--ouf-page-bg);
}

.k-window-title {
    color: var(--ouf-gray-dark);
    font-weight: bolder;
}

.k-nodata {
    font-weight: 400;
}

/* ---- 5. Landing components ---- */

/* Form and field labels */
label.fw-bold {
    color: var(--ouf-gray-dark);
}

/* Page-level panels: crimson accent across the top. Document groups are Bootstrap cards, so drop the card border first */
.document-group {
    border: 0;
}

.document-group,
.document-admin,
.matching-lookup {
    border-top: 4px solid var(--ouf-crimson);
}

/* Opt-in accent for Bootstrap alerts, in each variant's own border color */
.landing-alert {
    border-left: 4px solid var(--bs-alert-border-color);
}

/* ---- 6. Page-specific styles ---- */

/* Index (document groups) */
.document-groups {
    column-count: 2;
    column-gap: 1.5rem;
}

.document-group {
    break-inside: avoid;
}

.document-group-title {
    letter-spacing: .08em;
    color: var(--ouf-gray-dark);
}

.document-item {
    border: 1px solid var(--ouf-gray-light);
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

    .document-item:hover,
    .document-item:focus-visible {
        border-color: var(--ouf-gray);
        box-shadow: 0 4px 12px rgba(4, 16, 25, .12);
        transform: translateY(-1px);
    }

.document-item-title {
    color: var(--ouf-black);
    transition: color .15s ease;
}

    .document-item:hover .document-item-title,
    .document-item:focus-visible .document-item-title {
        color: var(--ouf-crimson);
    }

.document-item-description {
    font-size: .95rem;
    color: var(--ouf-black);
}

.document-file-icon {
    color: var(--ouf-gray-dark);
}

.secured-badge {
    right: 3px;
    bottom: 5px;
    line-height: 0;
    color: var(--ouf-gold);
}

@media screen and (max-width: 768px) {
    .document-groups {
        column-count: 1;
    }
}

/* Matching lookup */
.matching-lookup-header {
    color: var(--ouf-black);
}

.matching-lookup-details {
    background-color: var(--ouf-gray-light);
}

/* Admin file upload */
input[type="file"] {
    display: none;
}

.custom-file-upload {
    display: inline-block;
    cursor: pointer;
    font-weight: 500;
}

/* ---- 7. Blazor defaults ---- */
#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: 3.5rem;
        top: 0.5rem;
    }

.bl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NTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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