/* -------------------------------------- */
/* LAYOUT CONTAINER FOR MULTIPLE TABLES   */
/* -------------------------------------- */

.table-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Each table behaves like a card */
.table-container table {
  flex: 1 1 350px;
  max-width: 450px;
  align-self: flex-start;
}

/* -------------------------------------- */
/* BASE TABLE STYLING                     */
/* -------------------------------------- */

table {
  width: auto;
  min-width: 300px;
  max-width: 100%;
  border-collapse: collapse;
  background-color: var(--color-bg);
  background: transparent;
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(128, 0, 0, 0.15);
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* -------------------------------------- */
/* TITLE ROW — CINZEL ONLY                */
/* -------------------------------------- */

.table-title th {
  background-color: var(--color-primary);
  color: var(--color-support);
  font-family: "Cinzel", serif;
  padding: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* -------------------------------------- */
/* HEADER ROW — CINZEL                    */
/* -------------------------------------- */

thead tr:not(.table-title) {
  background-color: var(--color-primary);
  color: var(--color-support);
}

thead th {
  padding: 0.5rem;
  text-align: left;
  font-family: "Cinzel", serif;
}

/* -------------------------------------- */
/* BODY ROWS — NORMAL FONT                */
/* -------------------------------------- */

tbody tr {
  background-color: var(--color-support);
}

tbody tr:nth-child(even) {
  background-color: rgb(255, 248, 236);
}

tbody tr:hover {
  background-color: #fff4c2;
  color: var(--color-primary);
}

/* Table cells */
td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(128, 0, 0, 0.2);
  color: var(--color-text-light);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* -------------------------------------- */
/* COLUMN WIDTH CONTROL — RESULTS TABLE   */
/* -------------------------------------- */

.table-results tbody td:nth-child(1),
.table-results thead th:nth-child(1) {
  flex: 0 0 46px;
}

.table-results tbody td:nth-child(2),
.table-results thead th:nth-child(2) {
  flex: 0 0 77px;
}

.table-results tbody td:nth-child(3),
.table-results thead th:nth-child(3) {
  flex: 1;
}

/* -------------------------------------- */
/* COLUMN WIDTH CONTROL — ADMIN TABLE   */
/* -------------------------------------- */

.table-admin {
  table-layout: fixed;
  width: 100%;
}

.table-admin thead th:nth-child(1),
.table-admin thead th:nth-child(2) {
  width: 30%;
}

.table-admin thead th:nth-child(3) {
  width: 40%;
}

/* ----------------------------------------- */
/* COLUMN WIDTH CONTROL — THIRUVASAGAM TABLE */
/* ----------------------------------------- */

.table-thiruvasagam thead th:nth-child(1) {
  width: 15%;
}

.table-thiruvasagam thead th:nth-child(2) {
  width: 60%;
}

.table-thiruvasagam thead th:nth-child(3) {
  width: 25%;
}

.table-thiruvasagam tbody td:nth-child(3) {
  text-align: center;
}

.table-thiruvasagam .youtube-link {
  display: inline-block;
  color: #c1121f;
  text-decoration: none;
}

.table-thiruvasagam .youtube-link::before {
  content: "\f167";
  font-family: "Font Awesome 6 Brands";
  font-size: 24px;
  margin-right: 16px;
}
