body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background-color: rgb(55, 143, 221);
}

/* Table styles ------------------------------------------------------ */
table, th, td { /*The table has a border, as does the cells*/
  border:1px solid black;
}
th { /*The table headings have padding*/
  padding: 10px;
  background-color: white;
}
#assignments tr:nth-child(even) {
    background-color: #c9c9c9;
}

#assignments tr:nth-child(odd) {
    background-color: white;
}
#assignments tr:hover {
    background-color: #dbeafe;
}

/* Button styles ------------------------------------------------------ */
#addBtn {
  background-color: green;
  color: white;
  cursor: pointer;
}
#addBtn:hover {
  background-color: darkgreen;
}
.updateBtn {
  background-color: blue;
  color: white;
  cursor: pointer;
}
.updateBtn:hover {
  background-color: darkblue;
}
.deleteBtn {
  background-color: red;
  color: white;
  cursor: pointer;
}
.deleteBtn:hover {
  background-color: darkred;
}

/* Toggle styles ------------------------------------------------------ */
.toggle-container {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
/*Hide the checkbox*/
#viewToggle {
    display: none;
}
/*Switch the background of the toggle*/
.toggle {
    width: 50px;
    height: 25px;
    background-color: #ccc;
    border-radius: 15px;
    position: relative;
    cursor: pointer;
}
/*The circle inside the toggle*/
.toggle::after {
    content: "";
    width: 21px;
    height: 21px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}
/*When On*/
#viewToggle:checked + .toggle {
    background-color: #4CAF50;
}
/*Move cirlce*/
#viewToggle:checked + .toggle::after {
    transform: translateX(25px);
}

/* Form styles ------------------------------------------------------ */

/* Modal overlay */
#modalOverlay {
    display: none;                /* hidden by default */
    position: fixed;
    inset: 0;                     /* top, right, bottom, left = 0 */
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal box */
.modal {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Modal buttons */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* Statiscist view styles ------------------------------------------------------ */
#statistics p {
    font-size: 18px;
    width: fit-content;
    padding: 5px;
    background-color: white;
}

/* Page navigation styles------------------------------------------------------ */
.paging {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.paging button {
    padding: 4px 8px;
    cursor: pointer;
}

.paging button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-label input {
    width: 40px;
    text-align: center;
}

/* Search and filter styles ------------------------------------------------------ */
.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Make search box wider */
#searchInput {
    width: 300px;
    padding: 6px;
}

/* Make entries-per-page box smaller */
#entriesPerPage {
    width: 60px;
    padding: 6px;
    text-align: center;
}
/*For sorting by column*/
th[data-sort] {
    cursor: pointer;
    position: relative;
}

th[data-sort]:hover {
    background-color: #e0e0e0;
}
/* Sort arrows */
/* Default hollow arrows */
th[data-sort]::after {
    content: " ▽△";
    font-size: 11px;
}
/* Active ascending */
th.sorted-asc::after {
    content: " ▲";
    font-size: 12px;
}
/* Active descending */
th.sorted-desc::after {
    content: " ▼";
    font-size: 12px;
}


/* Thumbnail image styles */
.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
