﻿.reloadGridView {
    color: #d3d3d3;
    cursor: pointer;

    &:hover {
        color: darkcyan;
        cursor: pointer;
        text-decoration: none;
    }
}

/* Ensure the link text and icon align perfectly */
.btn.btn-cancel {
    background-color: #dc3546;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #dc3546;
}

    .btn.btn-cancel:hover {
        background-color: white;
        color: #dc3546;
        font-weight: bold;
        border: 1px solid #dc3546;
    }

.btn.btn-save {
    background-color: #198754;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #198754;
}

    .btn.btn-save:hover {
        background-color: white;
        color: #198754;
        font-weight: bold;
        border: 1px solid #198754;
    }

.btn.btn-search {
    background-color: steelblue;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid steelblue;
}

    .btn.btn-search:hover {
        background-color: white;
        color: steelblue;
        font-weight: bold;
        border: 1px solid steelblue;
    }

.btn.btn-insert {
    background-color: #0dcaf0; /* Vibrant teal/cyan */
    color: #212529; /* Dark text for high contrast on bright cyan */
    font-weight: bold;
    padding: 3px;
    border: 1px solid #0dcaf0;
}

    .btn.btn-insert:hover {
        background-color: white;
        color: #0dcaf0;
        font-weight: bold;
        border: 1px solid #0dcaf0;
    }

.btn.btn-warning {
    background-color: #ffc107; /* Fixed common hex typo for warning yellow */
    color: #212529; /* Dark text reads better on bright yellow */
    font-weight: bold;
    padding: 3px;
    border: 1px solid #ffc107;
}

    .btn.btn-warning:hover {
        background-color: white;
        color: #ffc107;
        font-weight: bold;
        border: 1px solid #ffc107;
    }

.btn.btn-filter {
    background-color: #495057;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #495057;
}

    .btn.btn-filter:hover {
        background-color: white;
        color: #495057;
        font-weight: bold;
        border: 1px solid #495057;
    }

.btn.btn-analyze {
    background-color: #6610f2;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #6610f2;
}

    .btn.btn-analyze:hover {
        background-color: white;
        color: #6610f2;
        font-weight: bold;
        border: 1px solid #6610f2;
    }

.btn.btn-reset {
    background-color: #6c757d; /* Bootstrap secondary gray */
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #6c757d;
}

    .btn.btn-reset:hover {
        background-color: white;
        color: #6c757d;
        font-weight: bold;
        border: 1px solid #6c757d;
    }

/* Enhanced Overlay with modern blur */
.updateProgress {
    position: fixed;
    z-index: 10000; /* Bumped slightly to ensure it sits above everything, including modals */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.7); /* Slightly darker */
    backdrop-filter: blur(4px); /* Trendy "glass" effect. Adds immense professionalism */
    -webkit-backdrop-filter: blur(4px); /* Safari support */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* To stack spinner and text vertically */
    transition: opacity 0.3s ease-in-out; /* Smooth fade in/out if used via JS */
}

/* The Professional Spinner - A refined Dual Ring */
.prof-spinner {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}

    .prof-spinner div {
        box-sizing: border-box;
        display: block;
        position: absolute;
        width: 51px;
        height: 51px;
        margin: 6px;
        border: 4px solid #ffc107; /* Your warning yellow */
        border-radius: 50%;
        animation: prof-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
        border-color: #ffc107 transparent transparent transparent; /* Makes the gap */
    }
    /* Subtle drop shadow to make the yellow pop on dark background */
    .prof-spinner div {
        filter: drop-shadow(0 0 5px rgba(255, 193, 7, 0.3));
    }

        .prof-spinner div:nth-child(1) {
            animation-delay: -0.45s;
        }

        .prof-spinner div:nth-child(2) {
            animation-delay: -0.3s;
        }

        .prof-spinner div:nth-child(3) {
            animation-delay: -0.15s;
        }

@keyframes prof-spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Updated styling for the "Caricamento" text */
.loading-text {
    margin-top: 15px;
    color: #ffc107;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.8;
}


/* Ensure the link text and icon align perfectly */
.btn.btn-cancel {
    background-color: #dc3546;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #dc3546;
}

    .btn.btn-cancel:hover {
        background-color: white;
        color: #dc3546;
        font-weight: bold;
        border: 1px solid #dc3546;
    }

.btn.btn-save {
    background-color: #198754;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #198754;
}

    .btn.btn-save:hover {
        background-color: white;
        color: #198754;
        font-weight: bold;
        border: 1px solid #198754;
    }

.btn.btn-search {
    background-color: steelblue;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid steelblue;
}

    .btn.btn-search:hover {
        background-color: white;
        color: steelblue;
        font-weight: bold;
        border: 1px solid steelblue;
    }

.btn.btn-insert {
    background-color: #0dcaf0; /* Vibrant teal/cyan */
    color: #212529; /* Dark text for high contrast on bright cyan */
    font-weight: bold;
    padding: 3px;
    border: 1px solid #0dcaf0;
}

    .btn.btn-insert:hover {
        background-color: white;
        color: #0dcaf0;
        font-weight: bold;
        border: 1px solid #0dcaf0;
    }

.btn.btn-warning {
    background-color: #ffc107; /* Fixed common hex typo for warning yellow */
    color: #212529; /* Dark text reads better on bright yellow */
    font-weight: bold;
    padding: 3px;
    border: 1px solid #ffc107;
}

    .btn.btn-warning:hover {
        background-color: white;
        color: #ffc107;
        font-weight: bold;
        border: 1px solid #ffc107;
    }

.btn.btn-filter {
    background-color: #495057;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #495057;
}

    .btn.btn-filter:hover {
        background-color: white;
        color: #495057;
        font-weight: bold;
        border: 1px solid #495057;
    }

.btn.btn-analyze {
    background-color: #6610f2;
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #6610f2;
}

    .btn.btn-analyze:hover {
        background-color: white;
        color: #6610f2;
        font-weight: bold;
        border: 1px solid #6610f2;
    }

.btn.btn-reset {
    background-color: #6c757d; /* Bootstrap secondary gray */
    color: white;
    font-weight: bold;
    padding: 3px;
    border: 1px solid #6c757d;
}

    .btn.btn-reset:hover {
        background-color: white;
        color: #6c757d;
        font-weight: bold;
        border: 1px solid #6c757d;
    }
/* Make the footer sticky at the bottom of the viewport */
.table-dark tfoot {
    position: sticky;
    bottom: -2px;
    z-index: 1020; /* Keeps it above the scrolling rows */
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5); /* Adds a cool shadow so it floats */
}

    /* Optional: Make the footer cells look distinct from normal rows */
    .table-dark tfoot td {
        background-color: #1a1d20 !important; /* Slightly darker than normal rows */
        font-weight: bold;
        color: #0dcaf0; /* Cyan text for totals */
        border-top: 2px solid #495057;
    }

.table-dark th a {
    color: inherit; /* Override the cyan above so the header starts white/grey */
    display: inline-flex; /* Keep the flex alignment ONLY for these headers */
    align-items: center;
}

    .table-dark th a:hover {
        color: #0dcaf0; /* Light up cyan on hover */
        text-decoration: none;
    }
        /* Bring the faded 'fa-sort' icon to full opacity on hover */
        .table-dark th a:hover i.fa-sort {
            opacity: 1 !important;
            color: #0dcaf0 !important;
        }


/* Add a smooth transition to your existing fixed-top navbar */
.navbar.fixed-top {
    transition: transform 0.3s ease-in-out;
}

/* The class we will toggle via JavaScript to hide the menu */
.navbar-hidden {
    transform: translateY(-100%);
}

/*.toolTipTitle {
    background-color: steelblue;
    border-radius: .25rem;
    color: white;
    display: block;
    font-weight: bold;
    text-align: center;*/
/*padding: 4px 8px;*/ /* Added padding to make it look like a real header */
/*margin-bottom: 6px;*/ /* Separation between title and body */
/*letter-spacing: 0.5px;
    text-transform: uppercase;*/
/*}*/

.toolTipTitle {
    background-color: steelblue;
    border-radius: .25rem; /* Round only the top corners to match the tooltip */
    color: white;
    display: block;
    font-weight: bold;
    text-align: center;
    /*padding: 3px 10px;*/ /*Tight but visible padding */
    margin-bottom: 5px; /* Keep it tight */
}

/* Cleanup: Remove the generic div rule as it interferes with custom classes */
/*.tooltip-inner {
    max-width: 1000px !important;*/
/*background-color: #000000*/ /*;*/ /* Ensure deep black background */
/*border: 5px solid #333;*/ /* Subtle border for definition */
/*border-radius: .25rem;
}*/

.tooltip-inner {
    max-width: 1000px !important;
    /*background-color: #000000 !important;*/ /* Force deep black background */
    border: none; /* !important;*/ /* REMOVE THE BORDER FRAME */
    font-size: smaller;
    /*border-radius: .25rem;*/
    /*padding: 0px !important;*/ /* Remove the padding that was likely adding the extra frame area */
    /*box-shadow: none;*/ /* Ensure no hidden shadows add to the frame */
}

/* Ensure the key-value area has its own small padding so it doesn't touch the edges */
/*.toolTipRow {
    padding: 0 10px 5px 10px;
}

.toolTipKey {
    color: #4fc3f7;*/ /* Vibrant cyan to match the 'R' icon */
/*margin-right: 5px;*/ /* Spacing between Key and Value */
/*text-align: left;
}

.toolTipValue {
    color: white;*/ /* Pure white for maximum visibility */
/*text-align: right;
}*/

.toolTipTitle {
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center; /* Or left, depending on your preference */
}

.toolTipRow {
    display: flex;
    justify-content: space-between; /* Pushes Key left and Value right */
    width: 100%;
}

.toolTipKey {
    color: #4fc3f7;
    margin-right: 15px; /* Ensures text doesn't overlap if it gets long */
    text-align: left;

    &:only-child {
        flex: 1; /* Forces the span to stretch across the entire width of the row */
        text-align: center; /* Centers the text inside the stretched span */
        margin-right: 0; /* Removes the 15px margin so it doesn't look slightly off-center */
    }
}

.toolTipValue {
    color: white;
    text-align: right;

    &:only-child {
        flex: 1; /* Forces the span to stretch across the entire width of the row */
        text-align: left;
        margin-right: 0; /* Removes the 15px margin so it doesn't look slightly off-center */
    }
}
/* 23 08 2021 */
/*.toolTipCaption {
    color: white;
    font-weight: bold;
    background-color: #1f2327;
    text-align: center;
}*/
/* 23 08 2021 */
/*.toolTipBody {
    text-align: justify;
    color: darkgray;
}*/
/* 31 08 2021 */
/*.tooltip div {
    color: #d3d3d3;
    font-size: smaller;
    text-align: left;
}*/
/* 31 08 2021 */
/*.toolTipTitle {*/
/*background-color: #1f2327;*/
/*background-color: steelblue;
    border-radius: .25rem;
    color: white;
    display: block;
    font-weight: bold;
    text-align: center;
}*/
/* 31 08 2021 */
/*.toolTipKey {
    color: steelblue;
    white-space: nowrap;
}*/
/* 31 08 2021 */
/*.toolTipValue {
    color: #d3d3d3;
    white-space: nowrap;
}*/
/* 31 08 2021 */
/*.toolTipKeyImportant {
    text-decoration: underline;
    font-weight: bold;
}*/
/* 31 08 2021 */
/*.tooltip-inner {
    max-width: 1000px !important;
}*/

.item-counter {
    color: fuchsia;
    margin-left: 2px;
    font-size: 0.9em;
    /*vertical-align: super;*/ /* This pushes it slightly higher than the baseline */
    line-height: 0; /* Prevents the counter from affecting the height of the label line */
}

.required-indicator {
    color: red;
    margin-left: 2px;
    /*vertical-align: super;*/
}
/* ========================================================
   CUSTOM DASHBOARD SWITCHES (White Unchecked Track)
   ======================================================== */
/* Unchecked State: Pure white track with a grey dot */
.custom-dashboard-switches .form-check-input {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    /* Uses %23adb5bd (hex #adb5bd) for the light grey dot */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23adb5bd'/%3e%3c/svg%3e") !important;
}
    /* Checked State: Vivid blue track with a pure white dot */
    .custom-dashboard-switches .form-check-input:checked {
        background-color: #0d6efd !important; /* Bootstrap Primary Blue */
        border-color: #0d6efd !important;
        /* Uses %23ffffff for the pure white dot */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    }
    /* Optional: Slight glow effect when focused so it feels native */
    .custom-dashboard-switches .form-check-input:focus {
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }
/* COMPACT MODE OVERRIDES */
body.compact-mode .table {
    font-size: 12px;
}
    /* Force a comfortable, consistent row height */
    body.compact-mode .table td,
    body.compact-mode .table th {
        padding: 2px 8px !important; /* Tight padding */
        height: 24px; /* Explicit height */
        line-height: 20px; /* Centers the text vertically */
        vertical-align: middle;
    }
/* COMPACT MODE OVERRIDES */
body.compact-mode .table {
    font-size: 12px;
}
    /* This replaces the 'height' rule with smart padding */
    body.compact-mode .table td,
    body.compact-mode .table th {
        padding: 10px 8px;
/* Tight top padding */
        /* Tight bottom padding */
        /* Side padding keeps it readable */
        vertical-align: middle; /* Keeps everything perfectly centered */
    }
/* 1. Define the base "Legacy" light mode */
body.legacy-theme .table {
    --bs-table-bg: #ffffff !important;
    --bs-table-color: #212529 !important;
}
/* 2. Striped rows (only if NOT active) */
body.legacy-theme .table-striped > tbody > tr:nth-of-type(odd):not(.table-active) > td {
    background-color: #e6e6fa !important; /* Pale Purple */
}

body.legacy-theme .table-striped > tbody > tr:nth-of-type(even):not(.table-active) > td {
    background-color: #add8e6 !important; /* Light Blue */
}
/* 3. The "Selected" Row: Force this to win over striping */
body.legacy-theme .table-striped > tbody > tr.table-active > td {
    background-color: #ffeeba !important; /* Pale Yellow highlight */
    color: #212529 !important;
    border-color: #e6dbb9 !important;
}
/* 4. PROTECT THE GRAPHICS: This is what stops the SVG from "filling" the cell */
body.legacy-theme .table-active .sparkline {
    background-color: transparent !important;
}
/* Ensure the lines stay a readable dark blue in light mode */
body.legacy-theme .sparkline polyline,
body.legacy-theme .sparkline circle {
    stroke: #0d6efd !important;
    fill: #0d6efd !important;
}

.sparkline {
    vertical-align: middle;
    overflow: visible;
    transition: transform 0.2s ease;
}

    .sparkline:hover {
        transform: scale(1.1); /* Slight pop-out effect when hovering */
    }
/* Sticky Header Logic */
/* 1. The Scrollable Container */
.sticky-table-container {
    max-height: 85vh;
    /*65vh;*/
    overflow-y: auto;
}
    /* 2. The Sticky Headers */
    .sticky-table-container table thead th {
        position: sticky;
        top: -1px; /* Pulls the header up to cover the top gap */
        z-index: 10;
        background-color: #212529; /* Matches your table-dark background */
        background-clip: padding-box; /* Stops background from bleeding under borders */
        /* Double shadow: 
       First line is your subtle border.
       Second line paints a solid 1px line underneath to hide row bleed. */
        box-shadow: inset 0 -1px 0 #373b3e, 0 1px 0 #212529;
    }
        /* 3. Ensure the counter column stays above the numbers */
        .sticky-table-container table thead th.col-row-number {
            z-index: 11;
        }

.progress {
    height: 10px;
    border-radius: 4px;
    background-color: #3e444a; /* Slightly lighter than your dark table */
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
/* 1. Target the table text itself */
.custom-grid-text {
    color: #d3d3d3 !important;
}
    /* 2. Force it down into standard cells, headers, and labels (spans) */
    .custom-grid-text td,
    .custom-grid-text th
    /*.custom-grid-text span*/ {
        color: #d3d3d3 !important;
    }
    /* 3. Optional: Move your Hyperlink colors here too! */
    .custom-grid-text a {
        transition: color 0.2s ease-in-out; /* Brilliant optimization here */
        color: #d3d3d3 !important;
        text-decoration: none;
    }
        /* Add !important to the hover color so it can override the base state */
        .custom-grid-text a:hover {
            color: #0dcaf0 !important; /* The Bootstrap $info cyan is a great choice */
            text-decoration: none;
            cursor: pointer; /* Excellent defensive CSS for LinkButtons! */
        }

.alert-red-border {
    cursor: default !important;
    border: 2px solid #dc3545 !important;
    border-radius: 0.375rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 1.2 !important;
    display: inline-block;
    vertical-align: middle;
}

.alert-green-border {
    cursor: default !important;
    border: 2px solid #198754 !important;
    border-radius: 0.375rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 1.2 !important;
    display: inline-block;
    vertical-align: middle;
}

.alert-orange-border {
    cursor: default !important;
    border: 2px solid #fd7e14 !important;
    border-radius: 0.375rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 1.2 !important;
    display: inline-block;
    vertical-align: middle;
}

.alert-yellow-border {
    cursor: default !important;
    border: 2px solid #ffc107 !important;
    border-radius: 0.375rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 1.2 !important;
    display: inline-block;
    vertical-align: middle;
}

.vibrantCyanYesHoverNoPointer {
    transition: color 0.2s ease-in-out; /* Note: better to transition just 'color' for performance */
    color: #d3d3d3;

    &:hover {
        color: #0dcaf0; /* A slightly darker cyan for hover feedback */
        text-decoration: none;
        cursor: default;
    }
}

.vibrantCyanYesHoverYesPointer {
    transition: color 0.2s ease-in-out; /* Note: better to transition just 'color' for performance */
    color: #d3d3d3;

    &:hover {
        color: #0dcaf0; /* A slightly darker cyan for hover feedback */
        text-decoration: none;
        cursor: pointer;
    }
}

.darkOrange_yesHoverVibrantCyan_noPointer {
    transition: color 0.2s ease-in-out; /* Note: better to transition just 'color' for performance */
    color: darkorange;
    cursor: default;
}

.darkOrange_yesHoverYellow_noPointer:hover {
    color: #0dcaf0;
    cursor: default;
    text-decoration: none;
}

.greenNoHoverNoPointerBlinking {
    animation: blinker 1s linear infinite;
    color: green;
    cursor: default;
}

.greenYesHoverNoPointer {
    transition: color 0.2s ease-in-out; /* Note: better to transition just 'color' for performance */
    color: #d3d3d3;
}

    .greenYesHoverNoPointer:hover {
        color: green;
        text-decoration: none;
        cursor: default;
    }

.redYesHoverNoPointer {
    transition: color 0.2s ease-in-out; /* Note: better to transition just 'color' for performance */
    color: #d3d3d3;
}

    .redYesHoverNoPointer:hover {
        color: red;
        text-decoration: none;
        cursor: default;
    }
