/* Increased specificity for DataTables paginator button size styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.25rem 0.75rem !important;
  font-size: 1.5rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button .bi {
  font-size: 2rem !important;
}
/* NFL Week column layout */
.nfl-week-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: auto;
  height: auto;
}

.nfl-week-number {
  text-align: center;
  font-weight: bold;
  font-size: 6vw;
  color: #007bff;
  line-height: 1;
}

.deadline-responsive {
  font-size: 1.1em;
  color: #dc3545;
  font-weight: bold;
  margin-top: 1em;
  margin-bottom: 0;
  text-align: center;
}

@media (max-width: 576px) {
  .deadline-responsive {
    margin-top: 0.2em !important;
    margin-bottom: 0 !important;
    font-size: 1em !important;
  }
}
.strike-bottom-right {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 0.85em;
  color: red;
  font-weight: bold;
}
.standings-cell {
  position: relative;
  height: 32px;
  padding: 0.25rem;
}
.points-bottom-right {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 0.85em;
  font-weight: bold;
}
/* Explicit outcome colors override the default when present */
.points-win { color: #198754 !important; } /* Bootstrap success green */
.points-gray { color: #ced4da !important; } /* lighter gray for past non-win, non-strike */
.points-future { color: #ced4da !important; } /* lighter gray for current/future self points */

/* Entry summary and standings footer color coding */
.entry-summary-0-strikes {
  background-color: #d4edda !important; /* Light green - same as Bootstrap success */
}
.entry-summary-1-strike {
  background-color: #fff3cd !important; /* Light yellow - same as Bootstrap warning */
}
.entry-summary-2-strikes {
  background-color: #ffe5cc !important; /* Light orange */
}
.entry-summary-3-strikes {
  background-color: #f8d7da !important; /* Light red - same as Bootstrap danger */
}

/* Thick border at top of standings table footer */
#standingsTable tfoot tr:first-child td {
  border-top: 3px solid #000 !important;
}

/* Border at bottom of standings table header */
#standingsTable thead tr:last-child th {
  border-bottom: 2px solid #000 !important;
}
body {
  background-color: #e1e1e1;
}
.form-wrapper {
  border-radius: 7px;
}

.form-wrapper label {
  font-weight: bold;
}

.errors li {
  list-style: none;
  width: 100%;
  text-align: center;
}

.errors ul {
  padding-left: 0;
  margin-bottom: 0;
}

.form-control::placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: lightgray;
  opacity: 1;
  /* Firefox */
}
.teamlogo {
  width: 40px;
}

@media (max-width: 768px) {
  .form-wrapper .text-right {
    text-align: center !important;
  }

  .form-wrapper .btn-primary {
    display: block;
    margin: 0 auto;
  }
}

.rotate-90 {
  writing-mode: vertical-rl;
  transform: rotate(-180deg);
  white-space: nowrap;
  text-align: left;
  vertical-align: bottom;
  padding: 10px 5px;
  min-height: 100px;
  /* display: inline-block; */
}

/* Fix positioning of rotated headers in standings table */
#standingsTable thead th,
#entryStatsTable thead th {
  vertical-align: bottom !important;
  position: relative !important;
  height: 140px !important;
}

#standingsTable thead th .rotate-90,
#entryStatsTable thead th .rotate-90 {
  position: absolute !important;
  bottom: 4px !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-180deg) !important;
  transform-origin: center center !important;
  min-height: auto !important;
  padding: 0 !important;
}

/* Make Entry Stats table columns equally sized */
#entryStatsTable {
  table-layout: fixed !important;
}

#entryStatsTable thead th,
#entryStatsTable tbody td {
  width: 20% !important;
}

/* Scope changes to the CRUD area only */
.gc-tight { display: inline-block; max-width: 100%; }

/* Kill the full-width wrappers GCE adds, e.g. gc-wrapper-full-width-147 */
.gc-tight [class*="gc-wrapper-full-width-"],
.gc-tight [class^="gc-wrapper-"],
.gc-tight .gc-datagrid,
.gc-tight .gc-datagrid table {
  width: auto !important;
  max-width: max-content;
}

/* Table itself should size to content */
.gc-tight table {
  table-layout: auto !important;
  display: inline-table;
}

/* Excel-like tight columns (remove if you prefer wrapping) */
.gc-tight table th,
.gc-tight table td { white-space: nowrap; }

/* If BS5 grid rows/cols exist inside the grid, stop them stretching */
.gc-tight .row { width: auto !important; }
.gc-tight [class^="col"], .gc-tight [class*=" col-"] { flex: 0 0 auto !important; width: auto !important; }

/* Compact layout for standings table */
#standingsTable { font-size: 0.9rem; }
#standingsTable td,
#standingsTable th { padding: 0.15rem 0.25rem; line-height: 1.05; }
#standingsTable .standings-cell { height: 24px; padding: 0; }
#standingsTable .standings-cell img { height: 20px !important; width: auto !important; display: block; margin: 0; }
#standingsTable .points-bottom-right,
#standingsTable .strike-bottom-right { font-size: 0.75em; right: 1px; bottom: 1px; }

/* Standings width constraints for ultra-wide screens */
.standings-wrapper {
  max-width: min(95vw, 1400px);
  margin-left: auto;
  margin-right: auto;
}

/* Let the table size to content instead of stretching */
.standings-wrapper #standingsTable {
  width: auto !important;
  table-layout: auto !important;
  display: inline-table;
}

/* Cap Player Name column (2nd column) and ellipsize overflow */
#standingsTable thead th:nth-child(2),
#standingsTable tbody td:nth-child(2) {
  max-width: 260px;
  width: 260px; /* helps prevent stretch */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fixed, balanced widths for week columns (columns 6 through 27 for weeks 1-22) */
#standingsTable thead th:nth-child(n+6):nth-child(-n+27),
#standingsTable tbody td:nth-child(n+6):nth-child(-n+27) {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  text-align: center;
}

/* Vertically center content for columns 1–7 in body rows (before week columns) */
#standingsTable tbody td:nth-child(-n+7) {
  vertical-align: middle !important;
}

/* Center the rank column (first column) */
#standingsTable thead th:nth-child(1),
#standingsTable tbody td:nth-child(1) {
  text-align: center !important;
}

/* Fix DataTables sort icons positioning */
#standingsTable thead th,
#ranksTable thead th {
  position: relative !important;
}

/* Hide the default DataTables sort icons completely */
#standingsTable thead th.sorting:after,
#standingsTable thead th.sorting_asc:after,
#standingsTable thead th.sorting_desc:after,
#ranksTable thead th.sorting:after,
#ranksTable thead th.sorting_asc:after,
#ranksTable thead th.sorting_desc:after,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
  display: none !important;
  content: none !important;
}

/* Also hide any background images that might be used for sorting */
#standingsTable thead th.sorting,
#standingsTable thead th.sorting_asc,
#standingsTable thead th.sorting_desc,
#ranksTable thead th.sorting,
#ranksTable thead th.sorting_asc,
#ranksTable thead th.sorting_desc,
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  background-image: none !important;
  padding-right: 18px !important;
}

/* Custom sort indicator for better positioning */
#standingsTable thead th.sorting:before {
  content: "↕" !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 4px !important;
  font-size: 1em !important;
  color: #999 !important;
  opacity: 0.7 !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

#standingsTable thead th.sorting_asc:before {
  content: "↑" !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 4px !important;
  font-size: 1em !important;
  color: #333 !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

#standingsTable thead th.sorting_desc:before {
  content: "↓" !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 4px !important;
  font-size: 1em !important;
  color: #333 !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

/* Custom sort indicators for ranksTable */
#ranksTable thead th.sorting:before {
  content: "↕" !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 4px !important;
  font-size: 1em !important;
  color: #999 !important;
  opacity: 0.7 !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

#ranksTable thead th.sorting_asc:before {
  content: "↑" !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 4px !important;
  font-size: 1em !important;
  color: #333 !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

#ranksTable thead th.sorting_desc:before {
  content: "↓" !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 4px !important;
  font-size: 1em !important;
  color: #333 !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

/* Also hide any background images that might be used for sorting */
#standingsTable thead th.sorting,
#standingsTable thead th.sorting_asc,
#standingsTable thead th.sorting_desc,
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  background-image: none !important;
  padding-right: 18px !important;
}

/* ========================================
   Game View Specific Styles (moved from embedded CSS)
   ======================================== */

/* Logo utility class */
.logo-height {
    max-height: 100px;
}

/* Sortable rank columns styling */
#scheduleTable td.fw-bold.sorted-asc::after {
    content: ' ▲';
    color: var(--bs-primary);
    font-size: 0.8em;
}

#scheduleTable td.fw-bold.sorted-desc::after {
    content: ' ▼';
    color: var(--bs-primary);
    font-size: 0.8em;
}

#scheduleTable td.fw-bold:hover {
    background-color: var(--bs-light);
}

/* Let DataTables use standard Bootstrap 5 pagination */

/* Ensure toggles are stable on iOS Safari */
#standingsFilters {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
    position: relative !important;
    z-index: 10 !important;
    min-height: 40px !important;
}

.form-check-input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Ensure form switches work on iOS */
.form-switch .form-check-input {
    width: 2em !important;
    margin-left: 0 !important;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='rgba(0,0,0,0.25)'/></svg>") !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    transition: background-position 0.15s ease-in-out !important;
    border-radius: 2em !important;
    border: 1px solid var(--bs-border-color) !important;
}

.form-switch .form-check-input:checked {
    background-position: right center !important;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='rgba(255,255,255,1.0)'/></svg>") !important;
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

/* Let DataTables use standard Bootstrap 5 pagination */

/* Fix DataTables entries dropdown styling */
.dataTables_length select {
    display: inline-block !important;
    width: auto !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    margin: 0 0.5rem !important;
}

.dataTables_length select:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.dataTables_length select:hover {
    border-color: #b0b8c1 !important;
}

.dataTables_length label {
    font-weight: 400 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.875rem !important;
    color: #6c757d !important;
}

/* Win/Loss styling for team logos */
.team-win {
    background-color: var(--bs-success-bg-subtle) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

.team-loss {
    background-color: var(--bs-danger-bg-subtle) !important;
    border-radius: var(--bs-border-radius-sm) !important;
}

/* Fix DataTables info and length menu styling */
.dataTables_info {
    font-size: 0.875rem;
    padding-top: 0.75rem;
}

.dataTables_length select {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Entry Summary table strike color customization */
.entry-summary-0-strikes {
    background-color: var(--bs-success-bg-subtle) !important;
    border-color: var(--bs-success-border-subtle) !important;
}

.entry-summary-1-strike {
    background-color: #fff3cd !important; /* Light yellow */
    border-color: #ffecb5 !important;
}

.entry-summary-2-strikes {
    background-color: #ffe0b3 !important; /* Orange */
    border-color: #ffd699 !important;
}

.entry-summary-3-strikes {
    background-color: var(--bs-danger-bg-subtle) !important;
    border-color: var(--bs-danger-border-subtle) !important;
}