﻿/* styles.css */

.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:lightgray
}

    .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 {
    width: calc(2rem + 2px);
    height: calc(2rem + 2px);
    margin-top: 0; /* keep it vertically aligned in flex */

}


/* Table container with scroll and maximum width */
.c-edit-table-container {
    border: 1px solid lightgray;
    border-radius: 0.5rem;
    overflow-x: auto; /* Enables horizontal scrolling */
    overflow-y: auto; /* Prevent vertical scrolling in the container */
    max-width: 200%; /* 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: 200%; /* Allow table to stretch fully */
    table-layout: fixed; /* Ensures columns respect defined widths */
    border-collapse: collapse; /* Combine borders for cleaner design */
    font-size: medium;
}

}

.c-edit-table thead {
    background-color: #5B2C88; 
    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 */
    }

.c-edit-table thead th {
    vertical-align: middle; /* Center-align header content vertically */
    border-bottom: 2px solid #dee2e6; /* Thicker bottom border for header */
    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: #5B2C88;
    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-col {
    position: sticky;
    left: 0; /* Freeze the column at the left */
    top:0;
    background-color: lightgray; /* Match the table's background */
    z-index: 2; /* Ensure it appears above other table content */
    box-shadow: 1px 0 2px rgba(0,0,0,0.1); /* Add a subtle shadow for clarity */
}

.vertical-text {
    writing-mode: vertical-rl; /* Rotate text vertically from right to left */
    text-orientation: mixed; /* Ensure proper character orientation */
    padding: 0.5rem; /* Adjust padding for spacing */
    text-align: center; /* Center-align text */
}

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:50%;
    width:50%
}

/* styles.css */
/* EditForm Styles */
.edit-form {
    margin-bottom: 1rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    width: 100%;
    background-color: lightgray;
    border-radius: 0.25rem;

}

    .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;
}
