/* Public content pages: team picker, match fees and sport pages. */

.sq-content {
  max-width: 780px;
}

.sq-content-wide {
  max-width: 1040px;
}

.sq-crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--sq-text-muted);
}

.sq-crumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--sq-text-disabled);
}

.sq-crumbs a {
  color: var(--sq-text-muted);
}

.sq-content h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--sq-text);
}

.sq-content .sq-section-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.sq-section .sq-content h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  color: var(--sq-text);
}

.sq-content h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--sq-text);
}

.sq-content p,
.sq-content li {
  line-height: 1.65;
}

.sq-content p {
  margin: 0 0 1rem;
}

.sq-content ul,
.sq-content ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.sq-content li + li {
  margin-top: 0.35rem;
}

.sq-content a:not(.sq-button) {
  color: var(--sq-primary-light);
}

.sq-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
}

.sq-fact {
  border: 1px solid var(--sq-border);
  border-radius: var(--sq-radius-md);
  background: var(--sq-surface);
  padding: 0.85rem 1rem;
  margin: 0;
}

.sq-fact dt {
  font-size: 0.8rem;
  color: var(--sq-text-muted);
  margin-bottom: 0.2rem;
}

.sq-fact dd {
  margin: 0;
  font-weight: 600;
  color: var(--sq-text);
}

.sq-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--sq-border);
  border-radius: var(--sq-radius-md);
}

.sq-table-wrap table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.sq-table-wrap th,
.sq-table-wrap td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--sq-border);
  line-height: 1.5;
}

.sq-table-wrap thead th {
  background: var(--sq-surface-elevated);
  color: var(--sq-text);
  font-weight: 600;
}

.sq-table-wrap tbody th {
  color: var(--sq-text);
  font-weight: 600;
}

.sq-table-wrap tr:last-child th,
.sq-table-wrap tr:last-child td {
  border-bottom: 0;
}

.sq-faq-list {
  margin-top: 1rem;
}

.sq-faq-list details {
  border: 1px solid var(--sq-border);
  border-radius: var(--sq-radius-md);
  background: var(--sq-surface);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.sq-faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--sq-text);
  list-style: none;
}

.sq-faq-list summary::-webkit-details-marker {
  display: none;
}

.sq-faq-list summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  color: var(--sq-text-muted);
}

.sq-faq-list details[open] summary::after {
  content: "-";
}

/* Inset, because the details element's overflow: hidden clips an outside ring. */
.sq-faq-list summary:focus-visible {
  outline-offset: -3px;
}

.sq-faq-list summary:hover {
  background: var(--sq-surface-elevated);
}

.sq-faq-body {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--sq-border);
  background: var(--sq-surface-elevated);
}

.sq-faq-body p:last-child {
  margin-bottom: 0;
}

.sq-cta {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--sq-border-strong);
  border-radius: var(--sq-radius-md);
  background: var(--sq-surface);
}

.sq-section .sq-content .sq-cta h2 {
  margin-top: 0;
}

.sq-cta p:last-of-type {
  margin-bottom: 0;
}

.sq-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.sq-related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sq-border);
}

.sq-section .sq-content .sq-related h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.sq-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.sq-related li + li {
  margin-top: 0;
}

/* Team picker */

.tp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .tp-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
  }
}

.tp-panel {
  border: 1px solid var(--sq-border-strong);
  border-radius: var(--sq-radius-md);
  background: var(--sq-surface);
  padding: 1.25rem;
  min-width: 0;
}

.sq-section .sq-content .tp-panel h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.tp-panel h2:focus {
  outline: none;
}

.tp-panel h2:focus-visible {
  outline: 2px solid var(--sq-primary-light);
  outline-offset: 3px;
}

.tp-panel .sq-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sq-text);
}

/* 16px stops iOS Safari zooming into the field on focus. */
.tp-panel textarea.sq-input,
.tp-panel select.sq-input {
  font-size: 1rem;
}

.tp-panel textarea.sq-input {
  min-height: 11rem;
  resize: vertical;
  line-height: 1.5;
}

.tp-team-count {
  max-width: 10rem;
}

.tp-count {
  font-size: 0.875rem;
  color: var(--sq-text-muted);
  margin: 0 0 0.75rem;
}

.sq-content h3.tp-subheading {
  font-size: 0.95rem;
  margin: 1rem 0 0.25rem;
}

.tp-subheading span {
  font-weight: 400;
  color: var(--sq-text-muted);
}

.tp-players {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
}

.sq-content .tp-players li + li {
  margin-top: 0;
}

.tp-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--sq-border);
}

.tp-player:last-child {
  border-bottom: 0;
}

.tp-player-name {
  overflow-wrap: anywhere;
  color: var(--sq-text);
}

.tp-panel select.tp-skill {
  width: auto;
  min-width: 4rem;
  padding: 0.4rem 0.5rem;
}

.tp-keeper {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--sq-text);
  white-space: nowrap;
  cursor: pointer;
}

.tp-keeper input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tp-status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--sq-text-muted);
}

.tp-status.tp-error {
  color: var(--sq-error);
}

.tp-empty {
  color: var(--sq-text-muted);
}

.tp-teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tp-team {
  border: 1px solid var(--sq-border);
  border-radius: var(--sq-radius-md);
  background: var(--sq-surface-elevated);
  padding: 0.9rem 1rem;
  min-width: 0;
}

.sq-content .tp-team h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.sq-content .tp-team-meta {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--sq-text-muted);
}

.sq-content .tp-team ol {
  margin: 0;
  padding-left: 1.4rem;
}

.sq-content .tp-team li {
  overflow-wrap: anywhere;
}

.sq-content .tp-team li + li {
  margin-top: 0.15rem;
}

.tp-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.45rem;
  border: 1px solid var(--sq-border-strong);
  border-radius: var(--sq-radius-pill);
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--sq-text-muted);
  vertical-align: middle;
}

@media (max-width: 480px) {
  .tp-player {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tp-keeper {
    grid-column: 1 / -1;
    min-height: 36px;
  }

  .tp-actions .sq-button {
    flex: 1 1 auto;
  }
}
