﻿@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

input[type=checkbox] + label {
    margin-left: 10px;
}

input[type=checkbox] + label:empty {
    display: none;
}

/* Prevent ASP.NET CheckBox / CheckBoxList wrapper <span> from rendering a duplicate Bootstrap checkbox border */
span.form-check-input {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
}

input[type=radio] + label {
    margin-left: 10px;
}

page-title {
    font-size: 20pt;
    line-height: 20pt;
    display: block;
    background: #EFEFEF;
    background-image: linear-gradient(90deg, rgba(168, 236, 255, 1) 33%, rgba(248, 209, 255, 1) 66%, rgba(156, 37, 156, 1) 100%);
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: 100% 3px;
    padding: 6px 20px 10px 20px;
    margin-bottom: 15px;
    font-weight: 100;
}

.body-content {
    flex: 1;
    margin-top: 25px;
    padding-left: 15px;
    padding-right: 15px;
}

.dl-horizontal dt {
    white-space: normal;
}

.form-control input[type=checkbox] {
    margin-right:15px;
}

.form-section{
    background-color:#EFEFEF;
    padding:0.5rem;
    margin:1rem 0;
    font-weight:bold;
}

.form-section:first-of-type {
    margin-top:0;
}

.pager a{
    display:inline-block;
    border:solid 1px silver;padding:0 5px;margin-right:2px;border-radius:5px;
    text-decoration:none;
}

    .pager a:hover {
        cursor: pointer;
        border: solid 1px #808080;
        background-color: yellow;
    }

.pager span {
    display: inline-block;
    border: solid 1px yellow;
    background-color: yellow;
    padding: 0 5px;
    margin-right: 2px;
    border-radius: 5px;
}

.form-control[readonly]{
    background-color:#EFEFEF;
}

.card-header-icons{
    display:inline-block;
    float:right;
}

    .card-header-icons a {
        display:inline-block;
        margin-left:5px;
        text-decoration:none;
    }

#pleaseWaitDimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none; /* Changed to flex via JS when shown */
    align-items: center;
    justify-content: center;
}

.dimmer-content {
    background: white;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: sans-serif;
    font-weight: bold;
    color: #333;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

    /* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}
@media screen and (max-width: 768px) {

    /* 
        =================================================================
        RESPONSIVE TABLE CLASSES FOR PMGridView 
        =================================================================
    */
    /* 1. Make the main wrapper block, and strip out the ugly outer grid borders */
    .pm-responsive-table,
    .pm-responsive-table > thead,
    .pm-responsive-table > tbody {
        display: block;
        border: none !important;
        background: transparent !important;
    }

        /* 2. Hide ONLY the column headers, let the .pager row survive! */
        .pm-responsive-table > thead > tr:not(.pager),
        .pm-responsive-table > tbody > tr:first-child th {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }

        /* 3. Clean up the Pager row so it sits nicely outside the cards */
        .pm-responsive-table tr.pager {
            display: block;
            border: none !important;
            background: transparent !important;
            margin: 10px 0;
        }

            .pm-responsive-table tr.pager td {
                border: none !important;
                padding: 5px 0;
            }

        /* 4. Style the data rows to look like modern UI cards */
        .pm-responsive-table > tbody > tr:not(.pager) {
            display: block;
            border: 1px solid #dcdcdc;
            border-radius: 8px; /* Soften the corners */
            box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Add a subtle modern shadow */
            margin-bottom: 15px;
            background-color: #fff;
            overflow: hidden; /* Keeps the bottom border cleanly inside the rounded corners */
        }

            /* 5. Force the data cells to behave */
            .pm-responsive-table > tbody > tr:not(.pager) > td {
                display: block;
                width: 100% !important;
                box-sizing: border-box !important;
                border: none;
                border-bottom: 1px solid #eee;
                position: relative;
                /* Top: 10px, Right: 15px, Bottom: 10px, Left: 50% */
                padding: 10px 15px 10px 40% !important;
                text-align: right !important; /* Force right align */
                min-height: 40px; /* Stop empty cells from collapsing flat */
                overflow-wrap: break-word;
            }

                /* Remove the bottom border from the very last cell in a card */
                .pm-responsive-table > tbody > tr:not(.pager) > td:last-child {
                    border-bottom: 0;
                }

                /* 6. Inject the label securely on the left */
                .pm-responsive-table > tbody > tr:not(.pager) > td::before {
                    content: attr(data-label);
                    position: absolute;
                    left: 15px;
                    top: 10px; /* Align perfectly with the 10px top padding of the cell */
                    width: 30%;
                    padding-right: 10px;
                    text-align: left !important;
                    font-weight: bold;
                   /* white-space: nowrap;*/
                    word-break:break-all;

                    color: #333; /* Make labels slightly softer than pure black */
                }
    /* 
        =================================================================
        END RESPONSIVE TABLE CLASSES FOR PMGridView 
        =================================================================
    */
}
