﻿/* styles.css */

﻿:root {
    --AVANTech-Blue: #25337A;
}

.modal-header {
    background-color: #25337A;
    color: white
}

.modal-header .btn-close {
    font-size: 20px;
}

.avt-modal-display-toggle {
    background-color: rgba(0,0,0,.5);
}

.panel-container {
    border-radius: .25rem;
    background-color: #25337A;
    padding: 10px;
    font-weight: bold;
    color: white;
    display: flex;
    flex-wrap: wrap; /* allows wrapping to next line instead of scrolling */
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px; /* spacing between items */
}

    .panel-container > div {
        flex: 1 1 180px; /* allows shrinking and growing between items */
        min-width: 150px; /* prevent collapsing too much */
    }

.c-table-container {
    border: 1px solid lightgray;
    border-radius: 0.25rem;
    overflow: hidden; /* Prevent content spilling out */
    max-height: 40%; /* Total height of the table */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    overflow-x:auto;
    overflow-y:auto;
    max-height:400px
}

.c-table {
    max-height: auto; 
    height:100%;
    table-layout:auto; 
    border-color: lightgray;
    border-radius:.25rem;
    font-size: medium;
    margin:0;
    width:200%

}
    .c-table thead {
        background-color: #25337A;
        color: white
    }

    .c-table th,
    .c-table td {
        padding: 0.75rem;
        vertical-align: top;
        border-top: 1px solid #dee2e6; /* Light gray border */
    }

    .c-table thead th {
        vertical-align: middle;
        border-bottom: 2px solid #dee2e6; /* Light gray border */
    }

    .c-table tbody + tbody {
        border-top: 2px solid #dee2e6; /* Light gray border */

    }
    .c-table-selected-row {
        background-color: lightgray; /* Or any shade of gray you prefer */
    }

.c-form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: .125rem;
}


/* Table container with scroll and maximum width */
.c-edit-table-container {
    
    border-radius: 0.5rem;
    overflow-x: auto; /* Enables horizontal scrolling */
    overflow-y: auto; /* Prevent vertical scrolling in the container */
    max-width: 100%; /* Ensure it doesn't exceed parent width */
    /*max-height: 300px;*/ /* Total height of the container */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

/* Compact table */
.c-edit-table {
    min-width: 100%;
    max-width: 90vw;
    width: 100%; /* Allow table to stretch fully */
    table-layout: fixed; /* Ensures columns respect defined widths */
    border-collapse: collapse; /* Combine borders for cleaner design */
    font-size: medium;
    border: 1px solid black;
}


.c-edit-table thead {
    background-color: #25337A; /* Light gray header background */
    color: white
}
.c-checkbox tr {
    line-height: 1;
    padding:0;
}

.c-edit-table th,
.c-edit-table td {
    padding: 0.5rem; /* Reduce padding for compactness */
    vertical-align: middle; /* Align content to the top */
    border: 1px solid #dee2e6; /* Add light gray borders */
    text-align: center; /* Left-align text by default */
    white-space: pre-wrap; /* Prevent text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden; /* Prevent content overflow */
    border: 1px solid black;
}

.c-edit-table thead th {
    vertical-align: middle; /* Center-align header content vertically */
    position: sticky; /* Make the header sticky */
    top: 0px; /* Adjust this to match the height of your Blazor layout's top bar */
    z-index: 2; /* Keep the header on top of the scrolling content */
    background-color: #25337A;
    color: white
}

    .c-edit-table tbody + tbody {
        border-top: 2px solid #dee2e6; /* Separator for multiple tbody blocks */
    }

/* Highlight selected row */
.c-edit-table-selected-row {
    background-color: #f8f9fa; /* Subtle background for selection */
}

/* sticky first column */
.sticky-col {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 2;
    background: lightgray;  /* cover what's underneath */
    outline: 1px solid black;   /* looks like a border, no layout shift */
    outline-offset: -1px;         /* tuck it in to align with grid lines */
    /* optional polish */
    box-shadow: 1px 0 2px rgba(0,0,0,0.1);
}

.vertical-text {
    writing-mode: vertical-rl; /* Rotate text vertically from right to left */
    text-orientation: mixed; /* Ensure proper character orientation */
    padding: 0.15rem 0.25rem; /* Reduced padding for smaller headers */
    margin: 0; /* Remove margin */
    text-align: center; /* Center-align text */
    font-size: 0.65rem; /* Smaller font size */
    line-height: 1.2; /* Tighter line height */
    max-height:110px;
}

thead .sticky-col {
    z-index: 3; /* Ensure the header cell appears above body cells */
}


.c-edit-table textarea{
    border: 1px solid lightgray;
    border-radius: 0.25rem;
    padding: 0.2rem;
    font-size: medium;
    width: 100%; /* Fill the cell */
    height: 50%;
    box-sizing: border-box; /* Include padding in the element's width */
    justify-content:center;
    vertical-align:middle
}

.c-edit-table input[type="checkbox"] {
    border: 1px solid lightgray;
    border-radius: 0.25rem;
    padding: 0.2rem;
    font-size: medium;
    width: 100%; /* Fill the cell */
    height: stretch;
    box-sizing: border-box; /* Include padding in the element's width */
    justify-content: center;
    vertical-align: middle
}

/* Compact input styles */
.c-edit-table input[type="text"],
.c-edit-table input[type="number"],
.c-edit-table select {
    border: 1px solid lightgray;
    border-radius: 0.25rem;
    padding: 0.2rem;
    font-size: medium;
    width: 100%; /* Fill the cell */
    box-sizing: border-box; /* Include padding in the element's width */
}

/* Compact button styles */
.c-edit-table button {
    padding: 0.2rem 0.4rem;
    font-size: medium;
    border-radius: 0.25rem;
    background-color: gray;
    color: white;
    border: none;
    cursor: pointer;
}

    .c-edit-table button:hover {
        background-color: lightgray;
    }


.c-checkbox{
    height:28px;
    width:28px;

}

/* styles.css */
/* EditForm Styles */
.edit-form {
    margin-bottom: 1rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    width: 100%;
    background-color: #25337A; border-radius: 0.25rem;
    padding: 10px;
    color:white
}

    .edit-form label {
        display: block;
        margin-bottom: 0.5rem;
    }

    .edit-form input[type="text"],
    .edit-form input[type="password"],
    .edit-form input[type="number"],
    .edit-form input[type="email"],
    .edit-form input[type="date"],.HasValue ? item.Date.Value.ToString("MM/dd/yyyy") : "")
    .edit-form input[type="time"],
    .edit-form textarea,
    .edit-form select {
        width: 100%;
        padding: 0.375rem 0.75rem;
        font-size: 1rem;
        line-height: 1.5;
        color: #495057;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid #ced4da;
        border-radius: 0.25rem;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }

    .edit-form input[type="checkbox"] {
        width: 30px;
        padding: 0.375rem 0.75rem;
        font-size: 1rem;
        line-height: 1.5;
        color: #495057;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid #ced4da;
        border-radius: 0.25rem;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }


        .edit-form input[type="text"]:focus,
        .edit-form input[type="password"]:focus,
        .edit-form input[type="number"]:focus,
        .edit-form input[type="email"]:focus,
        .edit-form input[type="date"]:focus,
        .edit-form input[type="time"]:focus,
        .edit-form textarea:focus,
        .edit-form select:focus {
            border-color: #80bdff;
            outline: 0;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
        }

    .edit-form .validation-message {
        color: #dc3545; /* Red color for validation messages */
        font-size: 0.875rem; /* Smaller font size for validation messages */
        margin-top: 0.25rem; /* Add space between input and validation message */
    }

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: darkgrey;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .btn:hover {
        color: #fff;
    }

.bi-toggle-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: fixed;
    top: 60px;
    right: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease;
    z-index:3000;
}

    .bi-toggle-button:hover {
        background-color: #0056b3;
    }

.square-button {
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 10px;
    text-align: center;
}

.modal-xxl {
    max-width: 90vw;  /* 90% of viewport width */
    height: auto;
}

.c-modal {
    border: medium;
    border-width: 2px;
    border-color: black;
    background-color:rgba(0,0,0,.5)
}
