/* css styles */
a {
  text-decoration: none;
}

/* Ensure Quarto tables scroll instead of overlap */
.scroll-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;      /* allow horizontal scrolling */
  margin-bottom: 1rem;   /* space so links below are clickable */
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 0;
} /*overflow-y: visible;*/   /* don’t cover content below */

tr:target td {
  background-color: #d6fdff;
  padding-left: 0.5em;
}

h1:target, h2:target, h3:target, div:target, 
section:target, li:target, p:target {
  background-color: #fff8d6;
  border-left: 10px solid #ffc107;
  padding: 0;
  display: inline-block;
  animation: clearHighlight 5s ease forwards;
}

@keyframes clearHighlight {
  0%   { background-color: #fff8d6; border-left: 10px solid #ffc107; }
  100% { background-color: transparent; border-left: none; box-shadow: inset 0 0 0 transparent; padding-left: 0;}
}

table.table td, table.table th {
  white-space: normal !important;
}

.grid {
  display: flex;
  gap: 1em;
}
.g-col-4 {
  flex: 1 1 0;
  display: flex;
}
.week-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.week-card-body {
  flex: 1 1 auto;
}
.week-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 0;
  margin-bottom: 0.2em;
}
.week-card-header {
  background: #fafbfc;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  font-size: 1.1em;
  border-radius: 8px 8px 0 0;
}
.week-card-body {
  padding: 16px;
}
.week-card hr {
  margin: 1em 0;
  border-top: 1px solid #b0b0b0;
}
.info-btn {
  display: inline-block;
  background: #dc3545;
  color: #fff !important;
  border: none;
  border-radius: 5px;
  padding: 4px 14px;
  font-size: 1em;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
  transition: background 0.2s;
}
.info-btn:hover {
  background: #bb2d3b;
}

.submit-btn {
  display: inline-block;
  background: #cccccc;
  color: #fff !important;
  border: none;
  border-radius: 5px;
  padding: 4px 14px;
  font-size: 1em;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
  transition: background 0.2s;
}
.submit-btn:hover {
  background: #cccccc;
}

.module {
    font-size: 18px;
    background: #fffec8;
    /* color: white; */
  }

  .table-primary {
    background: rgb(194, 195, 196);
    /* color: white; */
  }

  .table-warning {
    background: rgb(247, 226, 214);
    /* color: white; */
  }

   .table-note {
    background: rgb(214, 228, 247);
    /* color: white; */
  }

   .table-important {
    background: rgb(247, 214, 214);
    /* color: white; */
  }

/* Fix the table so that it is readable in smaller settings */
@media 
only screen and (max-width: 600px),
(min-device-width: 768px) and (max-device-width: 1024px)  {

  /* Force table to not be like tables anymore */
  table, thead, tbody, th, td, tr { 
    display: block; 
  }
  
  /* Hide table headers (but not display: none;, for accessibility) */
  thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  /*tr { border: 1px solid #ccc; }*/
  
  td { 
    /* Behave  like a "row" */
    border: none;
    /*border-bottom: 1px solid #eee; */
    position: relative;
    padding-left: 50%; 
  }
  
  .weeknum {
    font-weight: bold;
  }

  td:before { 
    /* Now like a table header */
    position: absolute;
    /* Top/left values mimic padding */
    top: 6px;
    left: 6px;
    width: 45%; 
    padding-right: 10px; 
    white-space: nowrap;
  }

}