/* =========================================================
   Legacy Table Styles (keep for any remaining table views)
   ========================================================= */

.leagues-table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  margin-bottom: 1em;
  border: none;
  background-color: #ffffff;
}

.leagues-table__header {
  background-color: #1a63af;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  text-align: center;
  letter-spacing: 1.2px;
  padding: 8px;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased; /* Adjusts for Outfit */
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

.leagues-table__empty-notice-row {
  font-style: italic;
  padding: 8px;
}

.leagues-table__cell,
.leagues-table__cell-final {
  padding: 8px;
  border: none;
  background: 0 0;
  text-align: left;
  float: none !important;
}

.leagues-table__link,
.leagues-table__button {
  color: #1a63af;
}

.leagues-table .leagues-table__row-hover tr:hover td {
  background-color: #dedede;
}

.leagues-table tr:nth-child(even) {
  background-color: #f4f4f4;
}

.leagues-table-h2 {
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
  margin: 0 0 16px;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased; /* Adjusts for Outfit */
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* Legacy “responsive table” rules (kept, but fixed obvious bugs)
   NOTE: This is only relevant if you still render .leagues-table anywhere. */
@media only screen and (max-width: 768px) {

  .leagues-table,
  .leagues-table thead,
  .leagues-table tbody,
  .leagues-table tr,
  .leagues-table th,
  .leagues-table td {
    display: block;
  }

  .leagues-table thead {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .leagues-table__row {
    border-bottom: 1px solid #231f20;
  }

  .leagues-table__cell {
    border: none;
    position: relative;
    padding-left: 35%;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: right;
  }

  .leagues-table__cell:before {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    text-align: left;
  }

  /* Label the data */
  .leagues-table__cell:nth-of-type(1):before { content: "League:"; }
  .leagues-table__cell:nth-of-type(2):before { content: "Starts:"; }
  .leagues-table__cell:nth-of-type(3):before { content: "Deadline:"; }
  .leagues-table__cell:nth-of-type(4):before { content: "Game Day:"; }
  .leagues-table__cell:nth-of-type(5):before { content: "Ages:"; }
  .leagues-table__cell:nth-of-type(6):before { content: "Cost:"; }
  .leagues-table__cell:nth-of-type(7):before { content: "Location:"; }
  .leagues-table__cell:nth-of-type(8):before { content: ""; }

  .leagues-table__button {
    background-color: #1a63af;
    border-radius: 1px;
    border: 2px solid #1a63af;
    color: #fff;
    box-shadow: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    padding: 8px 12px;
    text-transform: uppercase;
    width: auto;
    text-decoration: none;
    display: inline-block;
  }

  .leagues-table__button:hover {
    background-color: #fff;
    color: #1a63af;
    border: 2px solid #1a63af;
  }

  .leagues-table-h2 {
    color: #ffffff;
    background-color: #1a63af;
    padding: 10px;
    line-height: 1;
    font-size: 20px;
    text-align: center;
  }
  
  /* Title Smaller for Mobile */
  .msys-card__title {
    font-size: 22px !important;
  }
}

/* =========================================================
   Cards 2026 Front Page Design
   ========================================================= */

/* Front page dynamic sections */
.msys-front {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 0 24px;
}

.msys-front__header {
  margin: 18px 0 12px;
  padding: 10px 12px;
  background: #0b67a7;
  border-radius: 6px;
  color: #fff;
  text-align: center;
}

.msys-front__title {
  font-family: 'Outfit', serif;
  color: #ffffff;
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  font-size: 24px;
  -webkit-font-smoothing: antialiased; /* Adjusts for Outfit */
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.msys-front__subtitle {
  margin-top: 6px;
  font-style: italic;
  opacity: .9;
  font-size: 18px;
}

.msys-front__empty {
  padding: 14px;
  background: #f5f7fa;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 6px;
  text-align: center;
}

/* Card grid */
.msys-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  justify-items: stretch;
}

/* 2-up on tablet */
@media (max-width: 1024px) {
  .msys-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* stacked on mobile */
@media (max-width: 640px) {
  .msys-cards { grid-template-columns: 1fr; }
}

/* Card base */
.msys-card {
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.msys-card__media {
  display: block;
  position: relative; /* required for badge stack */
  text-decoration: none;
  background: #fff;
}

.msys-card__img {
  display: block;
  width: 100%;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e9eef5;
}

.msys-card__img--fallback {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0b67a7, #0d8ad6);
}

/* Badge stack container (supports multiple pills) */
.msys-card__badges {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* Base status badge */
.msys-card__badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: rgba(0,0,0,.80);
  color: #fff;
}

/* Status variants (kept for future flexibility) */
.msys-card__badge--playing {
  background: rgba(0,0,0,.80);
  color: #fff;
}

.msys-card__badge--closed {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

/* Countdown / late registration pill */
.msys-card__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #fff;
  background: #f59e0b; /* amber */
  opacity: .95;
}

.msys-card__pill--urgent {
  background: #dc2626; /* red */
}

.msys-card__pill--late {
  background: #dc2626; /* near-black */
}

/* Text box border (hard line) */
.msys-card__body {
  border: 1px solid #231f20;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 12px 12px 14px;
}

.msys-card__title {
  font-family: 'Outfit', serif;
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
}

.msys-card__title-link {
  color: #0b67a7;
  text-decoration: none;
}

/* Meta line row: spans with dot separators */
.msys-card__meta {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.35;
  color: #4b5563;
  margin-bottom: 10px;
}

.msys-card__meta span + span::before {
  content: " \00B7 ";
  color: #9ca3af;
  font-weight: 700;
}

.msys-card__meta .msys-card__meta--cost {
  color: #111827;
  font-weight: 700;
}

/* Date row */
.msys-card__dates {
  margin-top: 10px;
  font-size: 16px;
  color: #111827;
  margin-bottom: 12px;
  line-height: 1.45;
}

.msys-card__dates div {
  margin-top: 2px;
}

.msys-card__dates strong {
  font-weight: 800;
}

/* Right-align card action buttons */
.msys-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.msys-card__btn {
  display: inline-flex;
  font-family: 'Outfit', serif;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .3px;
  border: 2px solid #231f20;
  color: #231f20;
  background: #fff;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.msys-card__btn:hover,
.msys-card__btn:focus {
  background: #231f20;
  color: #fff;
  text-decoration: none;
}

.msys-card__btn--primary {
  background: #231f20;
  color: #fff;
}

.msys-card__btn--primary:hover,
.msys-card__btn--primary:focus {
  background: #fff;
  color: #231f20;
}

/* Closed card treatment */
.msys-card--closed {
  opacity: 0.85;
}

.msys-card__title-link-closed, .msys-card__title-link-closed:hover {
  color: #231f20;
  text-decoration: none;
}

/* Disabled button */
.msys-card__btn--disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .3px;
  border: 2px solid #231f20;
  background: #f2f2f2;
  color: #231f20;
  cursor: default;
}

/* =========================================================
   Playing with Pills
   ========================================================= */

@media (min-width: 900px) {
  .msys-card__badges{
    position: absolute;
    left: 14px;
    top: 14px;
    bottom: auto; /* override if you had bottom positioning */
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3;
  }

  .msys-card__badge,
  .msys-card__pill{
    box-shadow: 0 8px 20px rgba(0,0,0,.40);
    font-size: 13px;
    padding: 15px 15px;
    font-weight: 800;
  }
}