﻿.datatable-wrapper.no-header .datatable-container {
	border-top: 1px solid #d9d9d9;
}

.datatable-wrapper.no-footer .datatable-container {
	border-bottom: 1px solid #d9d9d9;
}

.datatable-top,
.datatable-bottom {
	padding: 8px 10px;
}

.datatable-top > nav:first-child,
.datatable-top > div:first-child,
.datatable-bottom > nav:first-child,
.datatable-bottom > div:first-child {
	float: left;
}

.datatable-top > nav:last-child,
.datatable-top > div:last-child,
.datatable-bottom > nav:last-child,
.datatable-bottom > div:last-child {
	float: right;
}

.datatable-selector {
	padding: 6px;
}

.datatable-input {
	padding: 6px 12px;
}

.datatable-info {
	margin: 7px 0;
}

/* PAGER */
.datatable-pagination ul {
	margin: 0;
	padding-left: 0;
}

.datatable-pagination li {
	list-style: none;
	float: left;
}

.datatable-pagination li.datatable-hidden {
    visibility: hidden;
}

.datatable-pagination a {
	border: 1px solid transparent;
	float: left;
	margin-left: 2px;
	padding: 6px 12px;
	position: relative;
	text-decoration: none;
	color: #333;
    cursor: pointer;
}

.datatable-pagination a:hover {
	background-color: #d9d9d9;
}

.datatable-pagination .datatable-active a,
.datatable-pagination .datatable-active a:focus,
.datatable-pagination .datatable-active a:hover {
	background-color: #d9d9d9;
	cursor: default;
}

.datatable-pagination .datatable-ellipsis a,
.datatable-pagination .datatable-disabled a,
.datatable-pagination .datatable-disabled a:focus,
.datatable-pagination .datatable-disabled a:hover {
    pointer-events: none;
    cursor: default;
}

.datatable-pagination .datatable-disabled a,
.datatable-pagination .datatable-disabled a:focus,
.datatable-pagination .datatable-disabled a:hover {
	cursor: not-allowed;
	opacity: 0.4;
}

.datatable-pagination .datatable-pagination a {
	font-weight: bold;
}

/* TABLE */
.datatable-table {
	max-width: 100%;
	width: 100%;
	border-spacing: 0;
	border-collapse: separate;
}

.datatable-table > tbody > tr > td,
.datatable-table > tbody > tr > th,
.datatable-table > tfoot > tr > td,
.datatable-table > tfoot > tr > th,
.datatable-table > thead > tr > td,
.datatable-table > thead > tr > th {
	vertical-align: top;
	padding: 8px 10px;
}

.datatable-table > thead > tr > th {
	vertical-align: bottom;
	text-align: left;
	border-bottom: 1px solid #d9d9d9;
}

.datatable-table > tfoot > tr > th {
	vertical-align: bottom;
	text-align: left;
	border-top: 1px solid #d9d9d9;
}

.datatable-table th {
	vertical-align: bottom;
	text-align: left;
}
	

.datatable-table th a {
	text-decoration: none;
	color: inherit;
}

.datatable-sorter, .datatable-filter {
	display: inline-block;
	height: 100%;
	position: relative;
	width: 100%;
}

.datatable-sorter::before,
.datatable-sorter::after {
	content: "";
	height: 0;
	width: 0;
	position: absolute;
	right: 4px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	opacity: 0.2;
}


.datatable-sorter::before {
	border-top: 4px solid #000;
	bottom: 0px;
}

.datatable-sorter::after {
	border-bottom: 4px solid #000;
	border-top: 4px solid transparent;
	top: 0px;
}

.datatable-ascending .datatable-sorter::after,
.datatable-descending .datatable-sorter::before,
.datatable-ascending .datatable-filter::after,
.datatable-descending .datatable-filter::before {
	opacity: 0.6;
}

.datatable-filter::before {
    content: "";
    position: absolute;
    right: 4px;
    opacity: 0.2;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
	border-radius: 50%;
    border-top: 10px solid #000;
    top: 25%;
}

.datatable-filter-active .datatable-filter::before {
    opacity: 0.6;
}

.datatable-empty {
	text-align: center;
}

.datatable-top::after, .datatable-bottom::after {
	clear: both;
	content: " ";
	display: table;
}

table.datatable-table:focus tr.datatable-cursor > td:first-child {
	border-left: 3px blue solid;
}

table.datatable-table:focus {
	outline: solid 1px black;
    outline-offset: -1px;
}
#myTable tbody td {
	font-size: 15px !important;
	
}
/* ===== MAKE DATATABLE RESPONSIVE ===== */

/* Enable horizontal scroll on small screens */
.datatable-container {
    width: 100% !important;
    overflow-x: auto !important;
}

/* Prevent columns from breaking badly */
.datatable-table {
    min-width: 700px; /* adjust based on your columns */
}

/* Keep action column in single line */
#myTable td:last-child {
    white-space: nowrap !important;
}                                   

/* Make table shrink properly on mobile */
@media (max-width: 768px) {             
		
    .datatable-top,
    .datatable-bottom {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
    }

    .datatable-top > div,
    .datatable-bottom > div {
        float: none !important;
        width: 100% !important;
        text-align: left !important;
    }

    .datatable-input {
        width: 100% !important;
    }
}

/* ===============================
   TABLE STYLING
=================================*/
#myTable {
    font-size: 11px !important;
    color: #222;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

#myTable thead th {
    background: #f6f6f6;
    color: #91222a;
    font-weight: 700;
    border-bottom: 2px solid #e6e6e6;
    padding: 10px 12px !important;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

    #myTable tbody td {
       
        vertical-align: middle;
        border-top: 1px solid rgba(0,0,0,0.03);
/*        word-break:break-word;*/
        font-size: 12px !important;
    }
/* Child row container */
table.dataTable tbody tr.child td {
    padding: 15px !important;
    text-align: left !important;
}

/* Layout: 3 columns */
table.dataTable tbody tr.child ul.dtr-details {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 !important;
    padding: 0 !important;
}

    /* Each field box */
    table.dataTable tbody tr.child ul.dtr-details li {
        display: flex !important;
        flex-direction: column; /* heading top, value bottom */
        border: 1px solid #dee2e6 !important;
        border-radius: 4px;
        overflow: hidden;
    }

    /* Heading */
    table.dataTable tbody tr.child ul.dtr-details .dtr-title {
        background: #f6f6f6; /* same feel as table header */
        font-weight: 600;
        padding: 6px 8px;
        border-bottom: 1px solid #dee2e6;
    }

    /* Value */
    table.dataTable tbody tr.child ul.dtr-details .dtr-data {
        padding: 6px 8px;
       
    }
/* Control width of fields inside DataTables child row */
table.dataTable tbody tr.child .form-control {
    width: 220px !important;
}

/* Make child row columns sit next to each other */
table.dataTable tbody tr.child .row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 20px;
}

/* Prevent columns from stretching full width */
table.dataTable tbody tr.child [class*="col-"] {
    flex: 0 0 auto !important;
    width: auto !important;
}

/* Align child content from left */
table.dataTable tbody tr.child td {
    text-align: left !important;
}
/* Child row full width */
table.dataTable tbody tr.child td {
    padding: 0 !important;
}

/* Convert child list into table layout */
table.dataTable tbody tr.child ul.dtr-details {
    display: table !important;
    width: auto !important;
    border-collapse: collapse;
}

    /* Each field becomes table cell */
    table.dataTable tbody tr.child ul.dtr-details li {
        display: table-cell !important;
        border: 1px solid #dee2e6;
        padding: 10px;
        vertical-align: top;
    }

/* Title same as header */
table.dataTable tbody tr.child .dtr-title {
    display: block;
    font-weight: 600;
    color: #8b0000;
    margin-bottom: 5px;
}

/* Data */
table.dataTable tbody tr.child .dtr-data {
    display: block;
}

    /* Each field box */
    table.dataTable tbody tr.child ul.dtr-details li {
        width: 50% !important;
        border: 1px solid #d7d8d9 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

        /* Header (UG/PG , Subject Code) */
        table.dataTable tbody tr.child ul.dtr-details li .dtr-title {
            display: block !important;
            width: 100%;
            padding: 8px 10px !important;
            background: none;
            border-bottom: 1px solid #dee2e6;
            font-weight: 600;
            height: 36px; /* forces equal header height */
            line-height: 20px;
        }

        /* Value (UG , GEUGM01) */
        table.dataTable tbody tr.child ul.dtr-details li .dtr-data {
            display: block !important;
            padding: 8px 10px !important;
            height: 36px; /* forces equal data height */
            line-height: 20px;
        }

table.dataTable tbody tr.child ul.dtr-details li {
    padding: 10px 0 !important; /* top-bottom | left-right */
}
/* Target datatable inside card-body */
.card-body > .table-responsive table.datatable thead th {
    font-size: 13px !important;
    color: #91222a !important;
    font-weight: 600;
}

.card-body > .table-responsive table.datatable tbody td {
    font-size: 13px !important;
}
/* Fix overlapping sort arrows in DataTables */
table.datatable thead th {
    position: relative;
    padding-right: 25px !important; /* space for arrows */
}

    /* Adjust arrow position */
    table.datatable thead th.sorting::before,
    table.datatable thead th.sorting::after,
    table.datatable thead th.sorting_asc::before,
    table.datatable thead th.sorting_desc::after {
        right: 8px !important;
    }
/* ===== Report Table Styling ===== */

/* Heading style */
#reportTable thead th {
    font-size: 13px !important;
    color: #91222a !important; /* maroon like your theme */
    font-weight: 600;
}

/* Body data style */
#reportTable tbody td {
    font-size: 13px !important;
    color: #333;
}
/* Fix sorting arrow overlap for all datatables */
table thead th {
    position: relative;
    padding-right: 30px !important; /* space for arrows */
}

    /* Adjust arrow position */
    table thead th.sortable::before,
    table thead th.sortable::after {
        right: 8px !important;
    }

/* Prevent header text from breaking */
table thead th {
    white-space: nowrap;
}
/* ===== NiceAdmin datatable-simple styling ===== */

/* Table header */
.datatable-simple thead th {
    font-size: 13px !important;
    color: #91222a !important; /* maroon theme */
    font-weight: 600;
}

/* Table body */
.datatable-simple tbody td {
    font-size: 13px !important;
    color: #333;
}

/* Optional header background like other tables */
.datatable-simple thead {
    background-color: #f6f6f6;
}
/* Add full borders to datatable */
.datatable {
    border-collapse: collapse !important;
    width: 100%;
}

    .datatable thead th {
        background: #f6f6f6;
        font-size: 14px;
        color: #8b0000;
        font-weight: 600;
    }

    /* Row and column borders */
    .datatable tbody td {
        border: 1px solid #dee2e6 !important;
    }

/* Optional: outer table border */
.datatable {
    border: 1px solid #dee2e6;
}
/* Style only Delete Allocation button */
input[formaction="/CourseMgmtGen/DeleteDSAllocation"] {
    background-color: white !important;
    color: #c00000 !important;
    border: 1px solid #c00000 !important;
    border-radius: 20px !important;
    padding: 6px 18px !important;
    font-size: 13px !important;
    font-weight: 500;
}

    /* Hover effect */
    input[formaction="/CourseMgmtGen/DeleteDSAllocation"]:hover {
        background-color: #c00000 !important;
        color: white !important;
    }
/* Header style */
#floatingSubjectsTable thead th {
    font-size: 13px !important;
    color: #91222a !important; /* same maroon color as your other tables */
    font-weight: 600;
    border: 1px solid #dee2e6;
}

/* Body data style */
#floatingSubjectsTable tbody td {
    font-size: 13px !important;
    color: #333;
    border: 1px solid #dee2e6;
}


    /* Fix arrow overlap if sorting plugin used */
    #floatingSubjectsTable thead th {
        padding-right: 30px;
        white-space: nowrap;
    }
/* ===== Subjects tables header ===== */
#subjectsTable1 thead th,
#subjectsTable2 thead th {
    font-size: 13px !important;
    color: #91222a !important; /* same maroon heading color */
    font-weight: 600;
    background: #f8f9fa;
    border: 1px solid #dee2e6 !important;
    padding: 8px 10px;
}

/* ===== Subjects tables body ===== */
#subjectsTable1 tbody td,
#subjectsTable2 tbody td {
    font-size: 13px !important;
    color: #333;
    border: 1px solid #dee2e6 !important;
}

/* Prevent header text wrapping */
#subjectsTable1 thead th,
#subjectsTable2 thead th {
    white-space: nowrap;
}
/* Style for Add Row button */
#addRowBtn {
    background-color: white !important;
    color: #c00000 !important;
    border: 1px solid #c00000 !important;
    border-radius: 20px !important;
    padding: 6px 18px !important;
    font-size: 13px !important;
    font-weight: 500;
    transition: 0.3s ease;
}

    /* Hover */
    #addRowBtn:hover {
        background-color: #c00000 !important;
        color: white !important;
    }
/* Fix width for UploadFiles Add button */
button[onclick*="UploadFiles"] {
    display: inline-block !important;
    width: auto !important;
    padding: 5px 14px !important; /* smaller padding */
}
/* Header style for this table */
.card-body .table thead th {
    font-size: 13px;
    color: #91222a;
    font-weight: 600;
}

/* Table data style for this table */
.card-body .table tbody td {
    font-size: 13px;
    color: #444;
} 