﻿/* ================================================================
   BASE / RESET — merged from wwwroot/css/site.css
   ================================================================ */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Slim focus ring — 1 px inner white halo + 2 px blue outer ring */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.2rem #258cfb;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
    outline: none;
}

/* Tempus Dominus display inputs: keep slim focus ring matching other form controls */
input.td-date:focus,
input.td-datetime:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
    outline: none;
}

/* Prevent readonly Tempus Dominus display inputs from showing grey background */
input.td-date[readonly],
input.td-datetime[readonly] {
    background-color: var(--bs-body-bg);
}

/* ================================================================
   VALIDATION STYLES
   ================================================================ */
.field-validation-error {
    color: #e80c4d;
    font-weight: bold;
    font-size: smaller;
}

.field-validation-valid {
    display: none;
}

.input-validation-error {
    border: 1px solid #e80c4d;
    background-color: #F9E3E4;
}

/* ── Bootstrap / custom .is-invalid — red border + blush background ─────────
   Applied by showValidationErrors() in site.js.
   :focus variants are needed because AdminLTE / Bootstrap both write
   border-color on :focus without !important, which would otherwise win
   while a field is actively focused.
   ────────────────────────────────────────────────────────────────────────── */
.form-control.is-invalid,
.form-select.is-invalid,
textarea.form-control.is-invalid {
    border-color:     #e80c4d !important;
    background-color: #F9E3E4 !important;
    box-shadow: 0 0 0 0.2rem rgba(232, 12, 77, 0.2) !important;
}

/* Keep the red ring even while the field is focused */
.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
textarea.form-control.is-invalid:focus {
    border-color:     #e80c4d !important;
    background-color: #F9E3E4 !important;
    box-shadow: 0 0 0 0.2rem rgba(232, 12, 77, 0.3) !important;
    outline: none;
}

/* Date-picker input-group: the calendar-icon .input-group-text needs a
   matching red border. JS adds .is-invalid-group on the wrapper div. */
.input-group.is-invalid-group .form-control,
.input-group.is-invalid-group .form-select,
.input-group.is-invalid-group .input-group-text {
    border-color: #e80c4d !important;
}
.input-group.is-invalid-group .form-control {
    background-color: #F9E3E4 !important;
}

.validation-summary-errors {
    color: #e80c4d;
    font-weight: bold;
    font-size: 1.1em;
}

.validation-summary-valid {
    display: none;
}

a:hover { cursor: pointer;}

/* Style for the Select2 container */
.select2-container {
    width: 100%;
}

.custom-checkbox-input {
    width: 25px; /* Adjust the width to your preference */
    height: 25px; /* Adjust the height to your preference */
    border: 1px solid #ccc; /* Add a border */
    border-radius: 4px; /* Rounded corners */
    cursor: pointer; /* Show a pointer cursor on hover */
}
    /* Define a checked state for the custom checkbox */
    .custom-checkbox-input:checked {
        background-color: #007bff; /* Change the background color when checked */
        border-color: #007bff; /* Change the border color when checked */
    }

.common-checkbox {
    accent-color: #d9534f;
}

.verify-checkbox {
    accent-color: #5bc0de;
}

.approve-checkbox {
    accent-color: #5cb85c;
}

.dropdown-item:hover {
    background-color: #c0a8d6; /* Change to your desired background color */
    cursor: pointer; /* Change to 'default' if you want the arrow cursor */
}

/* ===================================
   Validation Error Message Styling
   =================================== */

/* All validation error messages */
.text-danger,
.field-validation-error,
span[data-valmsg-for],
.invalid-feedback {
    font-size: 0.8125rem !important; /* 13px */
    font-weight: 400;
    line-height: 1.3;
    margin-top: 0.25rem;
    display: block;
}

/* Hide empty validation spans so they don't create vertical dead space
   before the user has tried to submit — the JS adds text + calls .show() */
.text-danger:empty,
span[data-valmsg-for]:empty {
    display: none;
}

/* Validation error messages for inline forms */
.form-inline .text-danger {
    margin-left: 0.5rem;
    display: inline-block;
}

/* Validation summary styling */
#validationSummary,
.validation-summary-errors {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 0.25rem;
    background-color: #f8d7da;
    color: #721c24;
}

    .validation-summary-errors ul {
        margin-bottom: 0;
        padding-left: 1.5rem;
    }
    .validation-summary-errors li {
        font-size: 0.8125rem;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-danger {
        font-size: 0.75rem !important; /* Even smaller on mobile */
    }
}


/* Loader styles */
.loader_website {
    position: fixed;
    top: 0;
    left: 0px;
    z-index: 1100;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: block;
    -webkit-transition: ease-in-out 0.1s;
    -moz-transition: ease-in-out 0.1s;
    -o-transition: ease-in-out 0.1s;
    -ms-transition: ease-in-out 0.1s;
    transition: ease-in-out 0.1s;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -o-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}

    .loader_website * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -o-box-sizing: border-box;
        -ms-box-sizing: border-box;
        box-sizing: border-box;
    }

body.loader .loader_website span {
    top: 18%;
}

.loader_website > span {
    display: block;
    width: 48px;
    height: 48px;
    padding: 4px;
    background-color: #ffffff;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    -o-border-radius: 100%;
    -ms-border-radius: 100%;
    border-radius: 100%;
    position: absolute;
    left: 50%;
    margin-left: -24px;
    top: -50px;
    -webkit-transition: ease-in-out 0.1s;
    -moz-transition: ease-in-out 0.1s;
    -o-transition: ease-in-out 0.1s;
    -ms-transition: ease-in-out 0.1s;
    transition: ease-in-out 0.1s;
    -webkit-box-shadow: #000 0px 5px 10px -5px;
    -moz-box-shadow: #000 0px 5px 10px -5px;
    -o-box-shadow: #000 0px 5px 10px -5px;
    -ms-box-shadow: #000 0px 5px 10px -5px;
    box-shadow: #000 0px 5px 10px -5px;
}

    .loader_website > span > svg {
        fill: transparent;
        stroke: #563d7c;
        stroke-width: 5;
        animation: loader_dash 2s ease infinite, loader_rotate 2s linear infinite;
    }

@keyframes loader_dash {
    0% {
        stroke-dasharray: 1, 95;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 85, 95;
        stroke-dashoffset: -25;
    }

    100% {
        stroke-dasharray: 85, 95;
        stroke-dashoffset: -93;
    }
}

@keyframes loader_rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/*loader_website*/
/* End loader styles */
/* Style for hovered option inside select dropdown */
select.form-select option:hover,
select.form-select option:focus {
    background-color: #0d6efd !important;
    color: #fff !important;
}

/* Add this to your custom CSS file */
.modal-xxl {
    max-width: 95% !important;
    width: 95% !important;
}

/* Or for full-width modal */
.modal-fullwidth {
    max-width: 98% !important;
    width: 98% !important;
    margin: 10px auto;
}

/* Pulse animation for updated gallery button */
@keyframes btn-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(23, 162, 184, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(23, 162, 184, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(23, 162, 184, 0);
    }
}

.btn-pulse {
    animation: btn-pulse 1s ease-in-out;
}

/* Add to wwwroot/css/site.css */
.text-ncfs {
    color: #dc3545; /* Same red as Bootstrap's text-danger */
    font-weight: 500; /* Optional: make it slightly bolder */
}

.text-setsco {
    color: #007bff; /* Same blue as Bootstrap's text-primary */
    font-weight: 500; /* Optional: make it slightly bolder */
}


/* ================================================================
   REPORTS DROPDOWN STYLES - Scoped to .reports-dropdown only
   Does NOT affect .user-menu or other dropdowns
   ================================================================ */

/* Dropdown menu width matching button */
.reports-dropdown .dropdown-menu {
    min-width: 100% !important;
    width: 100% !important;
}

    /* Dropdown item styling */
    .reports-dropdown .dropdown-menu .dropdown-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 10px 15px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

        /* Hover effect for dropdown items */
        .reports-dropdown .dropdown-menu .dropdown-item:hover {
            background-color: #6f42c1 !important; /* Purple to match bg-purple */
            color: #ffffff !important;
            cursor: pointer;
        }

        /* Active/Focus state */
        .reports-dropdown .dropdown-menu .dropdown-item:active,
        .reports-dropdown .dropdown-menu .dropdown-item:focus {
            background-color: #5a32a3 !important; /* Darker purple */
            color: #ffffff !important;
        }

        /* Icon styling in dropdown items */
        .reports-dropdown .dropdown-menu .dropdown-item i {
            margin-right: 8px;
            width: 16px;
            text-align: center;
            transition: transform 0.3s ease;
        }

        /* Subtle icon animation on hover */
        .reports-dropdown .dropdown-menu .dropdown-item:hover i {
            transform: scale(1.1);
        }

/* ================================================================
   USER MENU DROPDOWN - Preserve AdminLTE default styles
   ================================================================ */

/* Ensure user-menu dropdown is NOT affected by reports dropdown styles */
.nav-item.dropdown.user-menu .dropdown-menu {
    width: auto !important; /* Override any width rules */
    min-width: 280px !important; /* AdminLTE default */
}

.content-header {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Prevent body-level scrollbar in AdminLTE 4 layout-fixed mode.
   All page scrolling happens inside .app-main (overflow:auto). */
body.layout-fixed {
    overflow: hidden;
}

/* Floating left scroll-to-top button */
#btn-scroll-top-left {
    position: fixed;
    left: 16px;
    bottom: 24px;
    z-index: 2000;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform .15s ease, opacity .15s ease;
}

    /* ensure icon sizing */
    #btn-scroll-top-left i {
        font-size: 18px;
        line-height: 1;
        color: #fff;
    }

    /* subtle hover */
    #btn-scroll-top-left:hover {
        transform: translateY(-3px);
    }

/* mobile tweak */
@media (max-width: 576px) {
    #btn-scroll-top-left {
        left: 8px;
        bottom: 18px;
        width: 44px;
        height: 44px;
    }
}

/* ================================================================
   SIDEBAR BRAND — align logo + text with nav menu items
   nav items: sidebar-wrapper (0.5rem) + nav-link (1rem) = 1.5rem
   ================================================================ */
.sidebar-brand {
    justify-content: flex-start;
    padding-left: 1.5rem;
}
.sidebar-brand .brand-link .brand-image {
    float: none;
    width: 33px;
    height: 33px;
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-brand .brand-text {
    margin-left: 0.5rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ================================================================
   CARD COLLAPSE ICON TOGGLE — works with any card that uses
   data-bs-toggle="collapse" and the .card-collapse-icon /
   .card-expand-icon pair. BS5 adds .collapsed to the button
   automatically; no JS needed.
   ================================================================ */
[data-bs-toggle="collapse"].collapsed .card-collapse-icon { display: none; }
[data-bs-toggle="collapse"].collapsed .card-expand-icon   { display: inline-block !important; }

/* ================================================================
   ROUND BADGE — used on sample-card running numbers
   ================================================================ */
.round-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: #454443;
    color: #fff;
    font-weight: bold;
    font-size: .9rem;
    flex-shrink: 0;
}

/* ================================================================
   BTN-APP — AdminLTE 3 icon-button style (not in AdminLTE 4)
   ================================================================ */
.btn-app {
    min-width: 80px;
    padding: .75rem .5rem;
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
    border-radius: .375rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.btn-app > i {
    display: block;
    font-size: 1.4rem;
    margin-bottom: .25rem;
}

/* ================================================================
   PAGE ACTION BAR — sticky bottom action row for form pages
   Scrolling is on .app-main (overflow:auto), so sticky bottom
   pins correctly inside the scrollable container.
   ================================================================ */
.page-action-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .07);
    padding: .5rem 0;
    margin-top: 1rem;
    z-index: 100;
}

/* ================================================================
   ENVIRONMENT RIBBON — diagonal corner banner (ported from AdminLTE 3,
   not included in AdminLTE 4)
   ================================================================ */
.ribbon-wrapper {
    position: absolute;
    top: -2px;
    right: -2px;
    height: 70px;
    width: 70px;
    overflow: hidden;
    z-index: 10;
}
.ribbon-wrapper.ribbon-fixed {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2000;
}
.ribbon-wrapper.ribbon-lg {
    height: 120px;
    width: 120px;
}
.ribbon-wrapper.ribbon-lg .ribbon {
    top: 26px;
    right: 0;
    width: 160px;
}
.ribbon-wrapper .ribbon {
    position: relative;
    top: 10px;
    left: auto;
    right: -2px;
    width: 90px;
    padding: .375rem 0;
    text-align: center;
    text-transform: uppercase;
    font-size: .8rem;
    line-height: 100%;
    color: #1f2d3d;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .4);
    box-shadow: 0 0 3px rgba(0, 0, 0, .3);
    transform: rotate(45deg);
}
.ribbon-wrapper .ribbon::before,
.ribbon-wrapper .ribbon::after {
    content: "";
    position: absolute;
    bottom: -3px;
    border-top: 3px solid #9e9e9e;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
}
.ribbon-wrapper .ribbon::before {
    left: 0;
}
.ribbon-wrapper .ribbon::after {
    right: 0;
}

/* AdminLTE 4 clearfix ::after becomes a stray flex item in d-flex card headers and pushes .card-tools to the middle */
.card-header.d-flex::after {
    display: none;
}
