:root {
  --sams-highlight-color: #ce0310;
  --sams-border: 1px solid #d1d1d1;
  --sams-radius: 5px;
  --sams-bg: #ffffff;
  --sams-alt-bg: #f8f9fa;
  --sams-head-bg: #e8e7e7;
  --sams-muted: #666666;
}

/* Zum Markieren von Spielen des Heimteams in der Druckvorschau */
.print-highlight {
  color: var(--sams-highlight-color) !important;
}

/* Formatieren der Liga-Überschrift */
h2.sams-league-name {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  color: var(--global-palette4);
}

.sams-data * {
  line-height: 1em;
}

.team-highlight a,
.team-highlight > div.sams-team1,
.team-highlight > div.sams-team2 {
  color: var(--sams-highlight-color) !important;
}

.sams-data .col-sm-12 > i {
  display: block;
  text-align: center;
}

.sams-data [class*="col-sm-"] {
  padding-left: clamp(3px, 3vw, 15px);;
  padding-right: clamp(3px, 3vw, 15px);;
}

.sams-nextmatch {
  padding-bottom: 10px;
}

.sams-table,
.sams-results,
.sams-matches {
  background: var(--sams-bg);
  border: var(--sams-border);
  border-radius: var(--sams-radius);
}

.sams-table,
.sams-results,
.sams-matches,
.sams-nextmatch {
  vertical-align: middle;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.sams-nextmatch > div:not(:has(.sams-print-link)) {
  background: var(--sams-bg);
  border: var(--sams-border);
  border-radius: var(--sams-radius);
}

.sams-table > div,
/*.sams-table > div > div:not(.sams-print-link),*/
.sams-results > div,
/*.sams-results > div > div:not(.sams-print-link),*/
.sams-matches > div,
/*.sams-matches > div > div:not(.sams-ical-link):not(.sams-print-link),*/
.sams-nextmatch > div,
/*.sams-nextmatch > div > div:not(.sams-print-link),*/
.sams-nextmatch > div > div > div {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.sams-nextmatch > div,
.sams-nextmatch > div > div {
  height: 40px;
}

.sams-table > div:nth-of-type(odd),
.sams-results > div:nth-of-type(odd),
.sams-matches > div:nth-of-type(odd) {
  background-color: var(--sams-alt-bg);
}

div.sams-table-head {
  background: var(--sams-head-bg);
  font-weight: bold;
  text-shadow: 1px 1px #ffffff;
  min-height: 30px;
}

div.sams-table-head > .sams-team1 {
  padding-left: 15px !important;
}

div.sams-table-head > .sams-team2 {
  padding-right: 15px !important;
}

.sams-table > div,
.sams-results > div,
.sams-matches > div {
  padding: 3px;
  min-height: 30px;
}
.sams-table > div > div:not(.sams-print-link),
.sams-results > div > div:not(.sams-print-link),
.sams-matches > div > div:not(.sams-ical-link):not(.sams-print-link),
.sams-nextmatch > div > div:not(.sams-print-link) {
  padding: 0;
}
.sams-table > div:not(:last-child),
.sams-results > div:not(:last-child),
.sams-matches > div:not(:last-child) {
  border-bottom: var(--sams-border);
}

.sams-table > div.team-highlight,
.sams-results > div.team-highlight,
.sams-matches > div.team-highlight {
  color: var(--sams-highlight-color);
  background-color: #d1d1d1;
  text-shadow: 1px 1px #ffffff;
  font-weight: bold;
}

.sams-table > div,
.sams-table > div > div,
.sams-results > div,
.sams-results > div > div,
.sams-matches > div,
.sams-matches > div > div,
.sams-nextmatch > div,
.sams-nextmatch > div > div {
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.sams-table > div,
.sams-results > div,
.sams-matches > div,
.sams-nextmatch > div {
  flex-wrap: wrap;
}

.sams-nextmatch > div div.sams-team1,
.sams-nextmatch > div div.sams-team2 {
  padding: 0 10px;
}

div.sams-team1,
div.sams-team2 {
  display: flex;
  align-items: center;
}

div.sams-team1 i,
div.sams-team2 i {
  margin: 3px;
}

div.sams-team > i:before,
div.sams-team1 > i:before,
div.sams-team2 > i:after {
  display: inline-block;
  min-width: 50px;
  min-height: 50px;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #ffffff;
  vertical-align: -1rem;
  border: var(--sams-border);
  border-radius: 25px;
}

.sams-results.team-highlight > div:not(.team-highlight) div.sams-team1 > i:before,
.sams-results.team-highlight > div:not(.team-highlight) div.sams-team2 > i:after,
.sams-matches.team-highlight > div:not(.team-highlight) div.sams-team1 > i:before,
.sams-matches.team-highlight > div:not(.team-highlight) div.sams-team2 > i:after {
  display: none;
}

div.sams-team > i:before,
div.sams-team1 > i:before {
  background-position: center;
  margin-right: 5px;
}

div.sams-team2 > i:after {
  background-position: center;
  margin-left: 5px;
}

.sams-table > div div.sams-team,
.sams-results > div div.sams-team1,
.sams-results > div div.sams-match-details,
.sams-matches > div div.sams-team1,
.sams-nextmatch > div div.sams-team1 {
  justify-content: flex-start;
  text-align: left;
  flex-grow: 1;
}

.sams-table > div div.sams-print-link,
.sams-table > div.col-sm-12:has(.sams-print-link),
.sams-results > div div.sams-team2,
.sams-results > div div.sams-print-link,
.sams-results > div.col-sm-12:has(.sams-print-link),
.sams-matches > div div.sams-team2,
.sams-matches > div div.sams-ical-link,
.sams-matches > div div.sams-print-link,
.sams-matches > div.col-sm-12:has(.sams-print-link),
.sams-matches > div.col-sm-12:has(.sams-ical-link),
.sams-nextmatch > div div.sams-team2,
.sams-nextmatch > div div.sams-print-link,
.sams-nextmatch > div.col-sm-12:has(.sams-print-link) {
  justify-content: flex-end;
  text-align: right;
  flex-grow: 1;
}

div.sams-team1,
div.sams-team2 {
  flex: 1;
  min-width: 0;
}

.sams-table > div div.sams-place,
.sams-table > div div.sams-matches-played,
.sams-table > div div.sams-set-points,
.sams-table > div div.sams-points,
.sams-results > div div.sams-date,
.sams-results > div div.sams-result,
.sams-results > div div.sams-match-details,
.sams-results > div div.sams-match-location,
.sams-matches > div div.sams-date,
.sams-matches > div div.sams-vs,
.sams-matches > div div.sams-match-location,
.sams-nextmatch > div div.sams-vs {
  height: 100%;
}

div.sams-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: -10px;
  margin-bottom: -10px;
}

div.sams-limit,
.sams-table > div div.sams-print-link,
.sams-table > div div.sams-print-link a,
.sams-results > div div.sams-print-link,
.sams-results > div div.sams-print-link a,
.sams-results > div div.sams-match-details,
.sams-results > div div.sams-match-location,
.sams-results > div div.sams-match-location a,
.sams-matches > div div.sams-ical-link,
.sams-matches > div div.sams-ical-link a,
.sams-matches > div div.sams-print-link,
.sams-matches > div div.sams-print-link a,
.sams-matches > div div.sams-match-location,
.sams-matches > div div.sams-match-location a,
.sams-nextmatch > div div.sams-print-link,
.sams-nextmatch > div div.sams-print-link a,
.sams-nextmatch > div div.sams-match-location,
.sams-nextmatch > div div.sams-match-location a {
  font-style: italic;
  font-size: small;
  color: var(--sams-muted) !important;
  text-shadow: none;
  font-weight: normal;
}

div.sams-limit {
  padding-bottom: 10px;
}

aside .sams-nextmatch > div div.sams-match-date,
aside .sams-nextmatch > div div.sams-match-location {
  background-color: var(--sams-head-bg);
  color: var(--sams-muted);
  height: 100%;
}

.sams-nextmatch > div div.sams-match-location {
  margin-top: -20px;
}

aside .sams-nextmatch > div div.sams-match-location.col-sm-3 {
  display: none;
}

aside .sams-nextmatch > div div.sams-match-location.col-sm-9 {
  width: 100% !important;
}

aside .sams-nextmatch > div div.sams-match-location.col-sm-9 i,
aside .sams-nextmatch > div div.sams-match-location.col-sm-9 a {
  flex: auto;
  align-self: center;
}

.sams-nextmatch > div div.sams-match-date {
  text-shadow: 1px 1px #ffffff;
}

.sams-matches > div > div div.sams-match-date span.sams-match-time-before,
.sams-nextmatch > div div.sams-match-date span.sams-match-time-before {
  display: none;
}

.sams-nextmatch > div div.sams-match-location span.sams-match-time-after {
  display: contents;
}

div.sams-nextmatch > div.col-sm-12:not(:last-of-type):not(:nth-last-of-type(2)) {
  margin-bottom: 25px;
}

.sams-matches .dashicons-before:before {
  margin-right: 3px;
}

a.dashicons-before,
a.dashicons-before:hover {
  text-decoration: none;
}

aside .sams-nextmatch > div div.sams-match-location.dashicons-before:before {
  width: max-content;
  height: max-content;
  font-size: 50px;
}

.sams-nextmatch > div > div.sams-no-logo {
  justify-content: center;
}

aside .sams-table div.sams-table-head,
aside .sams-table div.sams-matches-played,
aside .sams-table div.sams-set-points,
aside .sams-table div.sams-points {
  display: none;
}
aside .sams-table div.sams-team {
  width: calc(100% - 8.33333333%);
}

aside .sams-nextmatch > div:has(div),
aside .sams-nextmatch > div > div {
  height: fit-content;
  flex-direction: column;
}

.sams-ical-link,
.sams-print-link {
  display: block !important;
  padding: 0 15px;
  flex-grow: inherit !important;
}

@supports selector(:has(*)) {
  .sams-nextmatch > div > div:has(div.sams-match-date) {
    background: linear-gradient(to right, var(--sams-head-bg) 0%, var(--sams-head-bg) 25%, transparent 25%, transparent 100%);
  }
  .sams-nextmatch > div:has(.sams-print-link) {
    background: none;
    padding-top: 20px;
  }
  aside .sams-nextmatch > div:has(.sams-print-link) {
    padding-top: unset;
  }
}

aside .sams-nextmatch > div > div:not(.sams-print-link) {
  background: var(--sams-bg) !important;
}

aside .sams-nextmatch > div > div,
aside .sams-nextmatch > div > div > div {
  width: 100% !important;
}

aside .sams-nextmatch > div div.sams-team1,
aside .sams-nextmatch > div div.sams-team2 {
  color: var(--sams-highlight-color);
}

aside .sams-nextmatch > div div.sams-match-date {
  padding: 10px;
  border-left: none;
}

aside .sams-nextmatch > div div.sams-match-date span.sams-match-time-before {
  display: contents;
}

aside .sams-nextmatch > div div.sams-match-location span.sams-match-time-after {
  display: none;
}

.sams-results > div div.sams-match-location span.sams-break,
.sams-matches > div div.sams-match-location span.sams-break,
.sams-nextmatch > div div.sams-match-location span.sams-break {
  display: none;
}
aside .sams-results > div div.sams-match-location span.sams-break,
aside .sams-matches > div div.sams-match-location span.sams-break,
aside .sams-nextmatch > div div.sams-match-location span.sams-break {
  display: contents;
}

aside .sams-nextmatch > div div.sams-match-location {
  display: flex;
  margin-top: 0;
  padding: 0 10px;
  border-top: var(--sams-border);
}

.sams-results div.sams-team1 a,
.sams-results div.sams-team2 a,
.sams-matches div.sams-team1 a,
.sams-matches div.sams-team2 a,
aside div.sams-team a,
aside div.sams-team1 a,
aside div.sams-team2 a {
  width: 100%;
}

.sams-results div.sams-team1 a,
.sams-results div.sams-team2 a,
.sams-matches div.sams-team1 a,
.sams-matches div.sams-team2 a {
  display: flex;
}

.sams-results div.sams-team1 a,
.sams-matches div.sams-team1 a {
  justify-content: flex-start;
}

.sams-results div.sams-team2 a,
.sams-matches div.sams-team2 a {
  justify-content: flex-end;
}

div.sams-date {
  overflow-wrap: break-word;
}

/* Responsive media queries */
@media screen and (max-width: 1024px) {
  div.sams-team1 > i,
  div.sams-team2 > i {
    display: none;
  }
}

@media (max-width: 767px) {
  .sams-data .col-sm-1  {
    width: 8.33333333%;
  }

  .sams-data .col-sm-2  {
    width: 16.66666667%;
  }

  .sams-data .col-sm-3  {
    width: 25%;
  }

  .sams-data .col-sm-4  {
    width: 33.33%;
  }

  .sams-data .col-sm-5  {
    width: 41.66666667%;
  }

  .sams-data .col-sm-6  {
    width: 50%;
  }

  .sams-data .col-sm-7  {
    width: 58.33333333%;
  }

  .sams-data .col-sm-8  {
    width: 66.66666667%;
  }

  .sams-data .col-sm-9  {
    width: 75%;
  }

  .sams-data .col-sm-10 {
    width: 83.33333333%;
  }

  .sams-data .col-sm-11 {
    width: 91.66666667%;
  }

  .sams-data .col-sm-12 {
    width: 100%;
  }

  .sams-table > div > div:not(.col-sm-12),
  .sams-results > div > div:not(.col-sm-12),
  .sams-matches > div > div:not(.col-sm-12),
  .sams-nextmatch > div > div:not(.col-sm-12) {
    flex-wrap: nowrap;
  }

  .sams-nextmatch > div div.sams-team1 {
    padding-top: 3px;
  }
  .sams-nextmatch > div div.sams-team2 {
    padding-bottom: 3px;
  }

  .sams-nextmatch > div div.sams-team1,
  .sams-nextmatch > div div.sams-team2 {
    float: left;
    width: 45%;
    display: block;
    text-align: center;
  }

  .sams-nextmatch > div div.sams-team1 > i,
  .sams-nextmatch > div div.sams-team2 > i,
  .sams-nextmatch > div div.sams-team1 > span,
  .sams-nextmatch > div div.sams-team2 > span {
    display: block;
  }

  .sams-nextmatch > div div.sams-vs {
    float: left;
    width: 10%;
    margin-top: unset;
    margin-bottom: unset;
    width: fit-content;
  }

  .sams-nextmatch > div div.sams-match-date,
  .sams-nextmatch > div div.sams-match-location {
    clear: both;
  }

  .sams-nextmatch > div > div,
  .sams-nextmatch > div:has(div),
  .sams-nextmatch > div:not(:has(i)),
  aside .sams-nextmatch > div > div {
    height: fit-content;
    flex-direction: column;
  }

  .sams-nextmatch > div:has(.sams-print-link) {
    padding-top: unset;
  }

  .sams-nextmatch > div > div,
  .sams-nextmatch > div > div > div,
  .sams-match-location.col-sm-10,
  aside .sams-nextmatch > div > div > div {
    width: 100% !important;
  }

  .sams-match-location.col-sm-10 {
    display: flex;
    align-items: center;
  }

  .sams-nextmatch > div div.sams-team1,
  .sams-nextmatch > div div.sams-team2 {
    padding: 5px;
    color: var(--sams-highlight-color);
  }

  .sams-nextmatch > div div.sams-match-date {
    padding: 10px;
    border-left: none;
  }

  .sams-nextmatch > div div.sams-match-date span.sams-match-time {
    display: flex;
  }

  .sams-nextmatch > div div.sams-match-location {
    display: flex;
    padding: 10px;
    border-top: var(--sams-border);
  }

  .sams-nextmatch > div div.sams-match-location:not(:empty) {
    margin-top: unset;
  }

  .sams-nextmatch > div > div:not(.sams-print-link) {
    background: var(--sams-bg) !important;
  }

  .sams-nextmatch > div .sams-match-date,
  .sams-nextmatch > div .sams-match-location {
    background-color: var(--sams-head-bg);
    color: var(--sams-muted);
    height: 100%;
  }

  .sams-nextmatch > div .sams-team1,
  .sams-nextmatch > div .sams-team2 {
    color: var(--sams-highlight-color);
  }

  .sams-nextmatch > div .sams-match-date {
    padding: 10px;
    border-left: none;
  }

  .sams-matches > div > div.sams-match-date .sams-match-time-before,
  .sams-nextmatch > div div.sams-match-date span.sams-match-time-before {
    display: contents !important;
  }

  .sams-nextmatch > div .sams-match-location {
    display: flex;
    margin-top: 0;
    padding: 0 10px;
    border-top: var(--sams-border);
  }

  .sams-match-location.col-sm-9 i,
  .sams-match-location.col-sm-9 a {
    flex: auto;
    align-self: center;
  }

  .sams-match-location.col-sm-2,
  .sams-match-location.col-sm-3,
  .sams-match-location .sams-match-time-after {
    display: none !important;
  }

  .sams-match-location .sams-break,
  .sams-matches .sams-match-location .sams-match-time-after {
    display: contents !important;
  }

  .sams-match-location.dashicons-before a {
    flex: 1;
  }

  .sams-match-location.dashicons-before:before {
    width: max-content;
    height: max-content;
    font-size: 50px;
  }

  .sams-matches .sams-match-date {
    padding-right: 0;
  }
}
