/*  app.css
 *  Pendigo Portal Global Styles
 *  Migrated from legacy MVC4
 */

/* Font Faces - Proxima Nova */
@font-face {
    font-family: 'ProximaNova-Light';
    src: url('/fonts/proximanova-light-webfont.woff') format('woff'),
         url('/fonts/proximanova-light-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ProximaNova-Regular';
    src: url('/fonts/proximanova-regular-webfont.woff') format('woff'),
         url('/fonts/proximanova-regular-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Font Faces - NHaas Grotesk (headings) */
@font-face {
    font-family: "NHaasGroteskDSPro-75Bd";
    src: url('/fonts/NHaasGroteskDSPro-75Bd.woff') format('woff'),
         url('/fonts/NHaasGroteskDSPro-75Bd.ttf') format('truetype');
}

@font-face {
    font-family: "NHaasGroteskDSPro-95Blk";
    src: url('/fonts/NHaasGroteskDSPro-95Blk.woff') format('woff'),
         url('/fonts/NHaasGroteskDSPro-95Blk.ttf') format('truetype');
}

/* Base Styles */
html {
    /* Prevent layout shift when scrollbar appears/disappears */
    overflow-y: scroll;
}

html, body {
    position: relative;
    padding: 0;
    margin: 0;
    font-size: 16px;
    font-family: "ProximaNova-Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #4c5d6f;
}

/* Links - Legacy Colors */
a, .btn-link {
    cursor: pointer !important;
    color: #24a6fa;
    text-decoration: none;
}

a:hover {
    color: #24a6fa;
    text-decoration: underline;
}

a:link, a:visited, a:active {
    border: 0;
    outline: none;
    color: #24a6fa;
}

/* Headings - NHaas Grotesk Bold */
h1, h2, h3, h4, h5, h6 {
    line-height: 120%;
    margin: 0;
    padding: 0;
    font-family: "NHaasGroteskDSPro-75Bd", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #4c5d6f;
}

/* Buttons */
.btn-primary {
    color: #fff;
    background-color: #24a6fa;
    border-color: #1e90d6;
}

.btn-primary:hover {
    background-color: #1e90d6;
    border-color: #1a7fc0;
}

.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 #24a6fa;
}

/* Tables - Legacy Style */
/* Scope to content areas only, exclude MiniProfiler and Radzen components */
#content table:not([class*="profiler"]):not([class*="rz-"]):not(.rz-grid-table), 
#content .table:not([class*="rz-"]),
.admin-dashboard table:not([class*="rz-"]):not(.rz-grid-table),
.admin-sectors table:not([class*="rz-"]):not(.rz-grid-table) {
    border-collapse: collapse;
    border: 1px solid #c3c3c3;
    table-layout: auto;
    display: table;
}

#content table:not([class*="profiler"]):not([class*="rz-"]):not(.rz-grid-table) th,
#content table:not([class*="profiler"]):not([class*="rz-"]):not(.rz-grid-table) td,
#content .table:not([class*="rz-"]) th,
#content .table:not([class*="rz-"]) td,
.admin-dashboard table:not([class*="rz-"]):not(.rz-grid-table) th,
.admin-dashboard table:not([class*="rz-"]):not(.rz-grid-table) td,
.admin-sectors table:not([class*="rz-"]):not(.rz-grid-table) th,
.admin-sectors table:not([class*="rz-"]):not(.rz-grid-table) td {
    border: 1px solid #d5d5d5;
    vertical-align: top;
    text-align: left;
    padding: 3px 5px;
    transition: all 500ms ease-in-out;
}

#content table:not([class*="profiler"]):not([class*="rz-"]):not(.rz-grid-table) th,
#content .table:not([class*="rz-"]) th,
.admin-dashboard table:not([class*="rz-"]):not(.rz-grid-table) th,
.admin-sectors table:not([class*="rz-"]):not(.rz-grid-table) th,
.tableHeader {
    background-color: #e2e2e2;
    font-family: "NHaasGroteskDSPro-75Bd", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#content table:not([class*="profiler"]):not([class*="rz-"]):not(.rz-grid-table) tr,
#content .table:not([class*="rz-"]) tr,
.admin-dashboard table:not([class*="rz-"]):not(.rz-grid-table) tr,
.admin-sectors table:not([class*="rz-"]):not(.rz-grid-table) tr,
.tableRow {
    background-color: #fff;
    transition: all 500ms ease-in-out;
}

#content table:not([class*="profiler"]):not([class*="rz-"]):not(.rz-grid-table) tr:hover,
#content .table:not([class*="rz-"]) tr:hover,
.admin-dashboard table:not([class*="rz-"]):not(.rz-grid-table) tr:hover,
.admin-sectors table:not([class*="rz-"]):not(.rz-grid-table) tr:hover,
.tableRow:hover {
    background-color: #f5f5f5;
}

/* Legacy class-based table styles */
.tableCell {
    padding: 3px 5px;
    transition: all 500ms ease-in-out;
    display: table-cell;
    vertical-align: top;
}

/* Content Area */
.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* Form Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Blazor Error Boundary */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0"idHJyYW5zZm9ybSgwIDAgNTYgNDkpIj48cGF0aCBkPSJNMjYzLjUwNiA1MUwyNjQuNzE3IDUxIDI2NS44MTMgNTEuNDgzNyAyNjUuNjA2IDUyLjI2NTg0TDI2Ny4wNTIgNTIuNzg4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDgAni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Form Controls */
.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;
}

/* Utility Classes - Legacy */
.clear::after {
    display: table;
    border: collapse;
    content: "";
    width: 100%;
    height: 0;
    clear: both;
}

.inner {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    position: relative;
}

.float-left {
    float: left;
}

/* Alert Styles - Legacy */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}

.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

/* Blur Effect */
.blur {
    filter: blur(3px);
    -webkit-filter: blur(3px);
}

/* Impersonating State */
body.impersonating {
    /* Visual indicator for impersonation mode */
}

/* =====================================================
   Header Navigation
   ===================================================== */

/* Hide hamburger menu on desktop */
#hamburger {
    display: none !important;
}

/* Show hamburger menu only on mobile */
@media (max-width: 768px) {
    #hamburger {
        display: block !important;
    }
    
    /* Hide desktop nav items on mobile */
    #primary-nav > ul > li:not(#hamburger) {
        display: none;
    }
    
    /* Show nav items when hamburger is checked */
    #nav-toggle:checked ~ #primary-nav > ul > li {
        display: block;
    }
}

/* User greeting in nav */
#user-info .user-greeting {
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Admin button styling - Primary Blue */
#admin-btn a {
    background-color: #1976d2;
    color: white !important;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

#admin-btn a:hover {
    background-color: #1565c0;
    text-decoration: none;
}

/* Logout button styling */
#logout-btn a {
    color: #6c757d;
}

#logout-btn a:hover {
    color: #f44336;
}

/* =====================================================
   Mobile Hamburger Menu
   ===================================================== */

/* Hide the checkbox */
.nav-toggle-checkbox {
    display: none !important;
}

/* Hide hamburger on desktop */
#hamburger {
    display: none;
}

@media (max-width: 768px) {
    /* Header height on mobile */
    #header {
        height: 70px !important;
    }

    #header .inner {
        position: relative;
    }

    /* Show hamburger on mobile */
    #hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        padding: 0;
        margin-right: 15px;
        background: none;
        border: none;
        cursor: pointer;
    }

    #hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #4c5d6f;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hamburger animation when checked */
    #nav-toggle:checked + #hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    #nav-toggle:checked + #hamburger span:nth-child(2) {
        opacity: 0;
    }

    #nav-toggle:checked + #hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Hide nav links by default on mobile */
    #primary-nav .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 10px 0;
        z-index: 9999;
        list-style: none;
        margin: 0;
    }

    /* Show nav links when checkbox is checked */
    #nav-toggle:checked ~ .nav-links {
        display: flex !important;
    }

    #primary-nav .nav-links li {
        display: block !important;
        margin: 0;
        text-align: center;
    }

    #primary-nav .nav-links li a {
        display: block;
        padding: 12px 20px;
        color: #4c5d6f;
        text-decoration: none;
    }

    #primary-nav .nav-links li a:hover {
        background-color: #f5f5f5;
        color: #427fed;
    }

    /* Remove underline effect on mobile */
    #primary-nav .nav-links li a::after {
        display: none !important;
    }

    /* Adjust content margin for mobile header */
    #content {
        margin-top: 70px !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile sections need padding */
    .section {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .section .inner {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Mobile user greeting */
    .user-greeting {
        padding: 12px 20px !important;
        display: block !important;
        text-align: center;
    }

    /* Mobile footer padding */
    #footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    #footer .inner {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* =====================================================
   MiniProfiler Styling Fixes (Admin only)
   Do NOT apply any global styles to MiniProfiler elements
   ===================================================== */

/* High z-index to ensure visibility */
.profiler-results {
    z-index: 2147483647 !important;
}

/* That's it - let MiniProfiler use its own bundled styles */