/*****************************************/
/*Header*/
/*****************************************/

.header {
  display: flex;
  align-items: center;
  background-color: #333;
  color: white;
  /* padding: 10px 20px; */
  height: 6.4rem;
  padding: 1rem 2rem;
  /* position: relative; */
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* optional shadow */
}
/* .header {
  background-color: white; /* make sure it scrolls with page */ /*} */

.logo {
  height: 4.8rem;
  margin-right: 1.2rem;
}

.title {
  font-size: 1.5em;
  flex-grow: 1;
  color: linear-gradient();
}

.icon {
  position: relative;
  cursor: pointer;
  font-size: 1.2rem;
  align-self: center;
  align-items: center;
}

.nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

/*****************************************/
/*Navigation*/
/*****************************************/

.nav__list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.nav__item {
  margin-left: 2.4rem;
  font-size: 1.5rem;
}

.nav__btn:link,
.nav__btn:visited {
  font-size: 1.7rem;
  font-weight: 400;
  text-decoration: none;
  display: block;
  transition: all 0.3s;
}

.nav__btn,
.nav__btn:link,
.nav__btn:visited {
  font-size: 1.6rem;
  text-decoration: none;
  color: white;
  padding: 0.8rem 1.6rem;
  border-radius: var(--border-radius);
  background-color: var(--primary-color);
  transition: all 0.3s;
  display: inline-block;
  border: none;
}

.nav__btn:hover,
.nav__btn:active {
  background-color: #334155;
}

/*MOBIL*/

.btn-mobile-nav {
  border: none;
  background: none;
  cursor: pointer;

  display: none;
}
.icon-mobile-nav {
  height: 4.8rem;
  width: 4.8rem;
  color: #fff;
}

.icon-mobile-nav[name="close-outline"] {
  display: none;
}

/*STICKY NAVIGATION*/
.sticky .header {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 6.4rem;
  padding-top: 0;
  padding-bottom: 0;
  background-color: #333;
  color: white;
  z-index: 999;
  box-shadow: 0 1.2rem 3.2rem rgba(0, 0, 0, 0.03);
}

.sticky .table-header {
  top: 6.4rem;
  background-color: #333;
}

/*****************************************/
/*Gamedatefilter*/
/*****************************************/

.section-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #f8f8f8;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  font-size: 1rem;
  margin-bottom: 2.4rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.filters > * {
  flex: 1 1 200px;
  min-width: 180px;
}

/* Select Styling */
.select {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  background-color: white;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.select:focus {
  border-color: #f44336;
  outline: none;
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* MULTISELECT Styling */
.league-select .select[multiple] {
  height: 6.5rem;
  padding: 0.4rem;
  font-size: 0.95rem;
  resize: vertical;
  overflow-y: auto;
}

/* Date input */
input[type="date"] {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  background-color: white;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

input[type="date"]:focus {
  border-color: #f44336;
  outline: none;
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* Date Range Grouping */
.date-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Supporttext */
.filter-supporttext {
  font-size: 0.85rem;
  color: #666;
  margin-top: -0.5rem;
}

/* .section-filters {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 2.4rem;
  font-size: 1.6rem;
  padding: 2.4rem 1.2rem;
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
  padding: 5px;
}

.select {
  width: 100%;
  border-radius: 5px;
  padding: 0.25em 0.5em;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1.1;
  background-color: #fff;
  transition: border-color 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Modernes Datumsfeld im Stil von Choices */
/*input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}*/

/* Optional: Hover- und Fokus-Effekt wie bei Choices */
/*input[type="date"]:hover {
  border-color: #999;
}

input[type="date"]:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.section-filters select,
.section-filters input[type="date"] {
  margin-right: 0.5rem;
}

.filter-supporttext {
  font-size: 1rem;
  line-height: 0.8;
} */

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-top: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

thead {
  background-color: #444;
  color: #eee;
  font-size: 1.2rem;
}

tr:hover {
  pointer: cursor;
}

th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 1.2rem;
}

.btn-verfuegbar {
  background-color: #2ecc71;
  color: white;
  /* From here on added */
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 1rem 1.2rem;
  font-weight: 500;
}

.btn-verfuegbar:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.game-referees {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 2rem;
}

.referee-name {
  font-weight: 500;
  color: var(--primary-color);
}

.referee-club {
  color: var(--secondary-color);
  font-size: 1.6rem;
}

.hidden {
  display: none;
}

.available {
  background-color: #a7051b;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal Box */
.modal {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 300px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Form Styling */
.modal form {
  display: flex;
  flex-direction: column;
}

.modal input {
  margin-bottom: 1rem;
  padding: 0.5rem;
  font-size: 1rem;
}

.modal button {
  padding: 0.5rem;
  background-color: #444;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.modal button:hover {
  background-color: #999;
}

.ref-group {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.ref-group label {
  font-weight: 600;
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
  color: var(--primary-color);
}

.ref-select {
  margin-bottom: 0.8rem;
}

.btn-assign {
  margin-top: 1rem;
}

#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  z-index: 9999;
}

.toast {
  background-color: #2ecc71;
  color: white;
  padding: 1.2rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.4rem;
  animation: slideIn 0.3s ease forwards;
  min-width: 200px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sticky table header */
table thead th {
  position: sticky;
  top: 6.4rem; /* height of navbar */
  z-index: 998;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* 👈 adds depth */
  border-bottom: 1px solid #e5e7eb; /* light border for clarity */
  background-color: #444;
  color: #eee;
}

tbody tr:hover {
  background-color: #f9fafb;
}

.btn {
  background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
  /* color: #f44336;
  border: 2px solid #f44336; */
  color: #e5e7eb;
  border: 2px solid #e5e7eb;
  padding: 12px 24px;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.btn:hover {
  /* background: #f44336; */
  background: #e5e7eb;
  color: #ba2f2f;
  box-shadow: 0 6px 20px rgba(186, 47, 47, 0.5);
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(186, 47, 47, 0.4);
}
#games-quote-count {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  /* margin: 24px 0; */
}

/* Basis-Box */
#games-quote-count .quote-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border-left: 6px solid transparent;
}

#games-quote-count .quote-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Zahl */
#games-quote-count .quote-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Label */
#games-quote-count .quote-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

/* 🔴 Wenig */
#games-quote-count .quote-box[data-status="low"] {
  border-color: #ba2f2f;
  background: linear-gradient(90deg, rgba(186, 47, 47, 0.08), #fff);
}
#games-quote-count .quote-box[data-status="low"] .quote-value {
  color: #ba2f2f;
}

/* 🟡 Mittel */
#games-quote-count .quote-box[data-status="medium"] {
  border-color: #d4a017;
  background: linear-gradient(90deg, rgba(212, 160, 23, 0.08), #fff);
}
#games-quote-count .quote-box[data-status="medium"] .quote-value {
  color: #d4a017;
}

/* 🟢 Gut */
#games-quote-count .quote-box[data-status="high"] {
  border-color: #2ecc71;
  background: linear-gradient(90deg, rgba(46, 204, 113, 0.08), #fff);
}
#games-quote-count .quote-box[data-status="high"] .quote-value {
  color: #2ecc71;
}

/* Responsive */
@media (max-width: 768px) {
  #games-quote-count {
    grid-template-columns: 1fr;
  }
}

/*****************************************/
/* Games Side by Side - Letzte & Nächste Spiele */
/*****************************************/

.games-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.4rem;
}

.last-games-section,
.upcoming-games-section {
  background-color: #f8f8f8;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  overflow: hidden;
}

/* Section Titles */
.last-games-section > p,
.upcoming-games-section > p {
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #e5e7eb;
}

/* Colored left border accent */
.last-games-section {
  border-left: 5px solid var(--primary-color);
}

.upcoming-games-section {
  border-left: 5px solid #2ecc71;
}

.upcoming-games-section > p {
  color: #27ae60;
}

/* Tables inside the sections */
.last-games-section table,
.upcoming-games-section table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  box-shadow: none;
}

/* Override global thead styles – these tables have no thead */
.last-games-section table thead,
.upcoming-games-section table thead {
  background: none;
}

.last-games-section table thead th,
.upcoming-games-section table thead th {
  position: static;
  background: none;
  color: inherit;
  box-shadow: none;
}

/* Table rows */
.last-games-section table tr,
.upcoming-games-section table tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.last-games-section table tr:last-child,
.upcoming-games-section table tr:last-child {
  border-bottom: none;
}

.last-games-section table tr:hover,
.upcoming-games-section table tr:hover {
  background-color: #f0f2f5;
}

/* Table cells */
.last-games-section table td,
.upcoming-games-section table td {
  padding: 0.9rem 0.6rem;
  font-size: 1.2rem;
  border-bottom: none;
  color: var(--text-color);
}

/* Date column – always first td */
.last-games-section table td:first-child,
.upcoming-games-section table td:first-child {
  white-space: nowrap;
  color: var(--secondary-color);
  font-size: 1.1rem;
  font-weight: 500;
  min-width: 10rem;
}

/* Match column – always second td */
.last-games-section table td:nth-child(2),
.upcoming-games-section table td:nth-child(2) {
  font-weight: 500;
  color: #333;
}

/* Result column – last-games only (third td) */
.last-games-section table td:last-child {
  text-align: right;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
  white-space: nowrap;
}

/* ── Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.6rem;
}
.modal-overlay.active {
  display: flex;
}

/* ── Modal Box ── */
.game-entry-modal {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 80rem;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease forwards;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Modal Header ── */
.game-entry-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #333;
  color: #fff;
  padding: 1.6rem 2rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.game-entry-modal__header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.game-entry-modal__header .spieltag-badge {
  font-size: 1.2rem;
  background: var(--accent);
  color: #fff;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-weight: 700;
}
.modal-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.modal-close-btn:hover {
  opacity: 1;
}

/* ── Modal Body ── */
.game-entry-modal__body {
  padding: 2rem;
}

/* ── Matchup Header ── */
.matchup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding: 1.2rem;
  background: var(--background-color);
  border-radius: 8px;
}
.matchup-team {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}
.matchup-vs {
  font-size: 1.4rem;
  color: var(--secondary-color);
  font-weight: 400;
}

/* ── Entry Table ── */
.entry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2rem;
}

/* Column groups */
.entry-table colgroup .col-team {
  width: 8rem;
}
.entry-table colgroup .col-seed {
  width: 3rem;
}
.entry-table colgroup .col-sep {
  width: 2rem;
}
.entry-table colgroup .col-satz {
  width: auto;
}
.entry-table colgroup .col-sieg {
  width: auto;
}

/* Header row */
.entry-table thead tr th {
  background: #444;
  color: #eee;
  padding: 0.9rem 1rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid #555;
  position: static; /* override sticky from style.css */
}
.entry-table thead tr th.th-left {
  text-align: left;
}

/* Body rows */
.entry-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}
.entry-table tbody tr:hover {
  background-color: #f9fafb;
}

.entry-table td {
  padding: 0.7rem 0.6rem;
  text-align: center;
  border: 1px solid #e5e7eb;
  font-size: 1.2rem;
  color: var(--text-color);
}
.entry-table td.td-left {
  text-align: left;
  font-weight: 500;
}
.entry-table td.td-sep {
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1.4rem;
}

/* Section label rows (Spieltag, Golden Set) */
.entry-table tr.section-label td {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
  text-align: left;
  border-top: 2px solid #cbd5e1;
}

/* Summary row */
.entry-table tr.summary-row td {
  background: #1e293b;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 1.3rem;
  border-color: #334155;
}
.entry-table tr.summary-header td {
  background: #334155;
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Read-only system cells */
.cell-system {
  background: #f8fafc;
  color: var(--secondary-color);
  font-style: italic;
  font-size: 1.1rem;
}

/* ── Editable Input Cells ── */
.cell-input {
  background: var(--input-bg) !important;
  padding: 0.3rem !important;
}
.score-input {
  width: 4.8rem;
  border: 1.5px solid var(--input-border);
  border-radius: 6px;
  padding: 0.5rem 0.4rem;
  font-size: 1.3rem;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  text-align: center;
  background: #fff;
  color: #333;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
}
.score-input::-webkit-inner-spin-button,
.score-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.score-input:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.score-input::placeholder {
  color: #ccc;
  font-weight: 400;
}

/* ── Summary value cells (Siegpunkte/Punkte/Bälle) ── */
.summary-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

/* ── Modal Footer ── */
.game-entry-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 1.2rem;
  padding: 1.6rem 2rem;
  border-top: 1px solid #e5e7eb;
}
.btn-cancel {
  background: transparent;
  color: var(--secondary-color);
  border: 1.5px solid #d1d5db;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-cancel:hover {
  background: #f3f4f6;
}
.btn-save {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.9rem 2.4rem;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}
.btn-save:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.btn-save:active {
  transform: scale(0.98);
}

/*****************************************/
/* Upload Field                          */
/*****************************************/

.gem-upload-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

/* Verstecktes natives File-Input */
.gem-file-input {
  display: none;
}

/* Styled Upload-Button */
.gem-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border: 1.5px dashed #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: var(--secondary-color);
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.gem-upload-label:hover .gem-upload-btn {
  border-color: #22c55e;
  color: #22c55e;
  background: #f0fdf4;
}

/* Dateiname nach Auswahl */
.gem-upload-filename {
  font-size: 1.1rem;
  color: var(--secondary-color);
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/*****************************************/
/* Create Game Modal Grid                */
/*****************************************/

.create-game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
}

.create-game-grid .ref-group:nth-child(5),
.create-game-grid .ref-group:nth-child(6),
.create-game-grid .ref-group:nth-child(7) {
  /* Spielort, Datum, Uhrzeit je eine Spalte */
}

@media (max-width: 44em) {
  .create-game-grid {
    grid-template-columns: 1fr;
  }
}

/*****************************************/
/* Score Highlight (Golden Set)          */
/*****************************************/

.score-winner {
  color: #2ecc71;
  font-weight: 700;
}
