﻿/* ✅ General Page Styling */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: white;
    /*background-color: #f4f4f4;*/
    margin: 0;
    padding: 0;
}
.validator-error {
    color: #dc3545; /* Bootstrap danger red */
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}
.custom-datagrid tbody tr {
    cursor: pointer;
}

.page-heading {
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 5px;
    text-align: left; /* ✅ Left aligned */
    flex-wrap: nowrap;
}

.grid-row-selected {
    background-color: #e6f4ff !important;
}

.custom-datagrid tbody tr {
    cursor: pointer;
}

.masterpagelink {
    align-self: flex-end; /* Overrides parent alignment */
    margin-bottom: 5px; /* Removes any default margin */
    text-decoration: none;
    color: #0c5bd3;
    font-size: 15px;
}

    .masterpagelink:visited {
        align-self: flex-end; /* Overrides parent alignment */
        margin-bottom: 5px; /* Removes any default margin */
        text-decoration: none;
        color: #0c5bd3;
    }

    .masterpagelink:hover {
        text-decoration: underline;
        margin-bottom: 5px; /* Removes any default margin */
        color: #0c5bd3;
        cursor: pointer;
    }

.error-panel {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-left: 5px solid #d8000c; /* thicker red left border */
    color: #842029;
    padding: 10px 44px 10px 12px; /* keep right padding reserved for close button */
    border-radius: 4px;
    margin: 12px 0;
    position: relative !important;
}

    /* Close button aligned to the right and vertically centered */
    .error-panel .error-close {
        position: absolute !important;
        top: 50% !important;
        right: 12px !important;
        transform: translateY(-50%) !important;
        border: none !important;
        background: transparent !important;
        font-size: 20px !important; /* slightly larger */
        font-weight: 400 !important; /* ensure not bold */
        line-height: 1 !important;
        cursor: pointer !important;
        color: #842029 !important;
        padding: 4px 6px !important;
        z-index: 5 !important;
    }

        /* focus / hover states */
        .error-panel .error-close:focus {
            outline: 2px solid rgba(132,32,41,0.25) !important;
            border-radius: 3px !important;
        }

        .error-panel .error-close:hover {
            color: #000 !important;
        }

.info-box {
    display: inline-block;
    background-color: #FFFBEB; /*pale yellow */
    border-left: 4px solid #F59E0B; /* amber */
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #000000; /* dark amber text */
    padding: 8px 13px;
    border-radius: 4px;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.3;
    margin: 6px 0;
}

.grid-row-selected {
    background-color: #e6f4ff !important;
}
/* ensure the selection bar doesn't push layout when visible */
.grid-wrapper {
    position: relative; /* ensure absolute children are positioned relative to wrapper */
    padding-top: 0; /* no space on initial load */
}
/* space for selection bar when shown */
/* small-screen adjustments */
@media (max-width:600px) {
    .selection-bar {
        height: auto;
        padding: 8px 12px;
        align-items: center;
    }

        .selection-bar .sel-close {
            width: 36px !important;
            height: 36px !important;
            font-size: 18px !important;
        }
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 9998;
}

.reference-menu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 460px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
}

.overlay.unsaved-changes-overlay {
    background: rgba(0,0,0,.28);
}

.reference-menu.unsaved-changes-menu {
    width: 380px;
    max-width: calc(100vw - 32px);
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,.24);
    color: #333;
    z-index: 9999;
}

    .reference-menu.unsaved-changes-menu .menu-close {
        top: 8px;
        right: 11px;
        font-size: 20px;
        color: #555;
    }

    .reference-menu.unsaved-changes-menu .menu-text {
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .reference-menu.unsaved-changes-menu .button-row {
        gap: 8px;
    }

.menu-close {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

    .menu-close:hover {
        color: #000;
    }

.menu-text {
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

.button-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

.selection-bar {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 48px; /* fixed height */
    padding: 0 12px; /* horizontal padding only */
    box-sizing: border-box;
    background: #eee;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    display: flex;
    align-items: center; /* vertical centering */
    gap: 3px;
    overflow: visible;
}
    .selection-bar .sel-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 20px !important; /* larger X */
        font-weight: 700 !important;
        line-height: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        background: transparent !important;
        cursor: pointer !important;
        border-radius: 6px !important;
        box-shadow: none !important;
    }

        /* Hover / focus states */
        .selection-bar .sel-close:hover,
        .selection-bar .sel-close:focus {
            background-color: rgba(0,0,0,0.04) !important;
            outline: none !important;
        }
    /* Ensure buttons in the selection bar get the same hover as the close button.
   This targets <a>, <button> and input buttons inside .selection-bar and forces
   the hover background even if inline styles exist. */
    .selection-bar a,
    .selection-bar button,
    .selection-bar input[type="button"],
    .selection-bar .sel-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        margin: 0 4px;
        border-radius: 6px;
        background: transparent;
        color: inherit;
        text-decoration: none;
        line-height: 1;
        box-sizing: border-box;
        cursor: pointer;
        border: 0; /* remove default button border */
    }

        /* Icon sizing inside those controls */
        .selection-bar a .material-icons,
        .selection-bar a .material-icons-outlined,
        .selection-bar button .material-icons,
        .selection-bar button .material-icons-outlined,
        .selection-bar .sel-action .material-icons,
        .selection-bar .sel-action .material-icons-outlined {
            font-size: 20px;
            vertical-align: middle;
            line-height: 1;
        }

        /* Hover / focus state (use !important to override inline background:none on LinkButton) */
        .selection-bar a:hover,
        .selection-bar a:focus,
        .selection-bar button:hover,
        .selection-bar button:focus,
        .selection-bar input[type="button"]:hover,
        .selection-bar input[type="button"]:focus,
        .selection-bar .sel-action:hover,
        .selection-bar .sel-action:focus {
            background-color: rgba(0,0,0,0.04) !important;
            outline: none;
        }
/* Keep wrapper padding in sync with increased bar height */
.grid-wrapper.has-selection-bar {
    padding-top: 64px; /* slightly larger than bar height to provide gap */
}


/* keep pointer & selected styling */
.custom-datagrid tbody tr {
    cursor: pointer;
}

.grid-row-selected {
    background-color: #e6f4ff !important;
}

.action-col,
.custom-datagrid td.action-col,
.custom-datagrid th.action-col {
    white-space: nowrap;
    width: 1%;
    padding-right: 10px;
    padding-left: 10px;
}
.centered-cell {
    text-align: center !important;
}
.act-div {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: #888;
    margin: 0 4px;
    vertical-align: middle;
}
.treeview {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: black;
    padding: 5px;
}

/* TreeView Nodes (Normal State) */
.treeview .node {
    padding: 3px 0;
    white-space: nowrap;
}

    /* TreeView Nodes (Hover State) */
    .treeview .node:hover {
        background-color: #f5f5f5;
    }

/* Selected Node */
.treeview .selected {
    font-weight: bold;
    background-color: #e0e0e0;
    padding: 2px 5px;
    border-radius: 3px;
}

/* TreeView Lines (if ShowLines="true") */
.treeview .line {
    background-image: url('path-to-your-line-images.gif'); /* Replace with your line images */
}

/* TreeView Expand/Collapse Icons */
.treeview .plus, .treeview .minus {
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    margin-right: 3px;
}

/* ✅ Page Container */
.page-container {
    width: 100%; /* Keep a fixed width for readability */
    /*margin-left: 20px;*/ /* Move it to the left */
    background: white;
    padding: 5px;
  /*  border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);*/
}

/* ✅ Page Heading */
.page-heading {
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 5px;
    text-align: left; /* ✅ Left aligned */
}

.page-headingsmall {
    font-size: 18px;
    color: #333;
    border-bottom: 0px solid #ddd;
    padding-top: 10px;
    padding-bottom: 0px;
    margin-bottom: 10px;
    text-align: left; /* ✅ Left aligned */
}

.hlink-add {
    background-color: #28a745; /* green */
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 14px;
    border-width: 1px;
    border-style: solid;
    border-color: #28a745;
    border-radius: 6px;
    display: inline-block;
    font-weight: normal;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

    .hlink-add:hover {
        background-color: #218838;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        text-decoration: none;
    }

.hlink2-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px; /* match button vertical padding */
    min-height: 36px;
    line-height: 1;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500; /* slightly bold */
    box-sizing: border-box;
    vertical-align: middle;
    border: 1px solid #888; /* dark gray border */
    border-radius: 6px;
    background: #fff; /* white background */
    color: #333; /* dark gray text */
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

  
    .hlink2-add:hover,
    .hlink2-add:focus {
        background: #f0f0f0; /* light gray hover */
        border-color: #666; /* slightly darker border on hover */
        color: #000; /* darker text */
        text-decoration: none;
        outline: none;
    }


    
    .hlink2-add .material-icons {
        font-size: 18px;
        line-height: 1;
        color: #fff;
    }


.hlink-delete {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px; /* match button vertical padding */
    min-height: 36px;
    line-height: 1;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500; /* slightly bold */
    box-sizing: border-box;
    vertical-align: middle;
    border: 1px solid #888; /* dark gray border */
    border-radius: 6px;
    background: #f44336; /* light red/pink background */
    color: white; /* dark gray text */
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

    .hlink-delete:hover,
    .hlink-delete:focus {
        background: #ffc7c7; /* darker red/pink hover */
        border-color: #666; /* same as original hover */
        color: #000; /* same as original hover text */
        text-decoration: none;
        outline: none;
    }



.error-text {
    font-size: 14px;
}

/* ✅ Form Container */
.form-container {
    padding: 10px;
    padding-left: 10px;
   
}

/* ✅ Form Group */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.form-group-row {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    
}
    .form-group-row .hlink {
        align-self: flex-end; /* Overrides parent alignment */
        margin-bottom: 5px; /* Removes any default margin */
        text-decoration: none;
        color: #0c5bd3;
    }
        .form-group-row .hlink:visted {
            text-decoration: underline;
            color: #0c5bd3;
            margin-bottom: 5px; /* Removes any default margin */
        }

        .form-group-row .hlink:hover {
            text-decoration: underline;
            color: #0c5bd3;
            margin-bottom: 5px; /* Removes any default margin */
        }

.hlink1 {
    align-self: flex-end; /* Overrides parent alignment */
    margin-bottom: 5px; /* Removes any default margin */
    text-decoration: none;
    color: #0c5bd3;
    font-size: 14px;
}
    .hlink1:visited {
        align-self: flex-end; /* Overrides parent alignment */
        margin-bottom: 5px; /* Removes any default margin */
        text-decoration: none;
        color: #0c5bd3;
    }

    .hlink1:hover {
        text-decoration: underline;
        margin-bottom: 5px; /* Removes any default margin */
        color: #0c5bd3;
    }
.big-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #007bff; /* Changes the selection color */
}

/* ✅ Labels */
.form-label {
    font-size: 15px;
    color: #363535; /*##D33593;*/
    margin-bottom: 5px;
    font-weight: 600; /* ✅ Not bold */
}
.form-text {
    font-size: 15px;
    color: #000000; /*#545b62;*/
    margin-bottom: 5px;
    font-weight: normal; /* ✅ Not bold */
}
.form-label-data {
    font-size: 15px;
    color: #000; /*#545b62;*/
    margin-bottom: 5px;
    font-weight: normal; /* ✅ Not bold */
}
/* ✅ Required Field Indicator */
.required {
    color: red;
    font-weight: bold;
}
/*.hlink {
    text-decoration: none;*/ /* Removes default underline */
    /*color: #0066cc;*/ /* Default link color (change as needed) */
    /*transition: text-decoration 0.2s ease;*/ /* Smooth hover effect */
    /*margin-bottom: 5px;
}

    .hlink:hover {
        text-decoration: underline;*/ /* Underline appears on hover */
    /*}*/

/* ✅ Form Controls */
.form-control {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.3s ease;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
}

    .form-control:focus {
        border-color: #007bff;
        outline: none;
    }
select.form-control {
    /* ensure we draw our own arrow & right edge */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2rem; /* room for the arrow */
    background-color: #fff;
    /* fake a 1px vertical divider + arrow on the right */
    background-image: linear-gradient(#ccc, #ccc), /* 1px divider */
    url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-size: 1px 60%, 12px 8px;
    background-position: calc(100% - 1.75rem) 50%, /* divider position */
    calc(100% - 0.75rem) 50%; /* arrow position */

    border-right: 1px solid #ccc; /* make sure the right border is visible */
}

/* ✅ Read-Only Text Fields */
.form-text {
    font-size: 14px;
    color: #333;
    display: inline-block;
    margin-left: 10px;
}

/* ✅ Button Group */
.button-group {
    text-align: left;
    margin-top: 20px;
    display: flex; /* ✅ Ensures buttons stay in one line */
    gap: 10px; /* ✅ Adds space between buttons */
    flex-wrap: wrap; /* ✅ Prevents buttons from stacking on small screens */
}

/* ✅ Buttons */
.btn {
    /* ✅ Overrides any inherited full-width styles */
    border-style: none;
    border-color: inherit;
    border-width: medium;
    min-width: 50px; /* ✅ Ensures a proper button size */
    padding: 10px 20px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
    display: inline-block; /* ✅ Forces inline display */

    white-space: nowrap;
    width: auto;
    overflow: visible;
    text-overflow: ellipsis; /* Optional: adds ... if container is ever restricted */
}

.btn-primary {
    background: #007bff;
    color: white;
}

    .btn-primary:hover {
        background: #0056b3;
    }

.btn-secondary {
    background: #6c757d;
    color: white;
    text-decoration: none;
}

    .btn-secondary:hover {
        background: #545b62;
        text-decoration: none;
    }

.btn-disabled {
    background: #ddd;
    color: white;
    text-decoration: none;
}

    .btn-disabled:hover {
        background: #ddd;
        cursor: not-allowed;
        text-decoration: none;
    }

.btnred {
    /* ✅ Overrides any inherited full-width styles */
    border-style: none;
    border-color: inherit;
    border-width: medium;
    min-width: 50px; /* ✅ Ensures a proper button size */
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
    display: inline-block; /* ✅ Forces inline display */
}

.btnred-primary {
    background: #CC0000;
    color: white;
}

button.btnred.btnred-primary:hover {
    background: #eb2626;
}

.btnred-secondary {
    background: #DDDDDD;
    cursor:not-allowed;
    color: white;
}

    .btnred-secondary:hover {
        background: #DDDDDD;
        cursor: not-allowed;
    }

    /* DATA GRID*/

/* Professional DataGrid Styling */
.custom-datagrid {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    background-color: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #ddd;
}

    /* Keep Existing Header Styling, Ensure Semi-Bold */
    .custom-datagrid th,
    .custom-datagrid .HeaderStyle {
        background-color: inherit; /* Keeps the previous background */
        color: #000000;
        text-align: left;
        padding: 12px;
        font-weight: 600 !important; /* Semi-Bold Headers */
        font-size: 14px;
    }

        .custom-datagrid th a,
        .custom-datagrid th a:link,
        .custom-datagrid th a:visited,
        .custom-datagrid th a:active,
        .custom-datagrid th a:hover {
            color: #000000 !important;
            text-decoration: none !important;
            font-weight: 600 !important;
        }

    /* Table Row Styling */
    .custom-datagrid td {
        padding: 10px;
        border-bottom: 1px solid #ddd;
    }

    /* Alternating Row Coloring */
    .custom-datagrid tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    /* Hover Effect */
    .custom-datagrid tr:hover {
        background-color: #f1f1f1;
    }

/* Make Table Responsive */
@media (max-width: 768px) {
    .custom-datagrid {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.gridview-queries .form-control {
    width: auto !important;
    max-width: 200px;
    display: inline-block;
}

.gridview-queries td {
    padding: 8px 10px;
}
.success-message {
    background-color: #d4edda;
    color: #000000;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 8px 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    padding-left: 10px;
}

    .success-message h4 {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 18px;
    }

    .success-message p {
        margin: 5px 0;
        line-height: 1.5;
    }

    .success-message ul {
        margin: 10px 0 0 20px;
    }

        .success-message ul li {
            margin-bottom: 5px;
        }

.alert-Special {
    background-color: white;
    color: #856404;
    border: 1px solid #D33593;/*#ffeeba;*/
    border-radius: 8px;
    padding: 16px 20px;
    padding-top: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.alert-warning {
    display: flex;
    align-items: flex-start;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

    .alert-warning img {
        width: 40px;
        height: 40px;
        margin-right: 15px;
    }

.alert-warning-content h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.alert-warning-content p {
    margin: 4px 0;
    line-height: 1.5;
}
.back-link {
    color: #155724; /* Dark green for contrast */
    font-size: 14px;
    text-decoration: none;
    border: 1px solid #d4d1d1;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: #ddd;
    transition: all 0.2s ease;
    display: inline-block;
}

    .back-link:hover {
        background-color: #d4d1d1;
        color: #155724;
    }

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    appearance: none;
    border: 2px solid #ccc;
    cursor: pointer;
    display: inline-block;
    position: relative;
    border-radius: 4px; /* Adjust the value for more or less rounding */
}

    input[type="checkbox"]:checked {
        background-color: #007bff;
        border-color: #007bff;
    }

        input[type="checkbox"]:checked::after {
            content: '✓';
            color: white;
            font-size: 16px;
            font-weight: bold;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }
