/*
 * Tipsformulär: extrafrågor
 * Ursprung: /user/tip_extras.php
 */

.tip-extra-flag {
  transform: scale(.42);
  transform-origin: center center;
  margin: 0;
}

.tip-extra-question-card {
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  padding: 1rem;
  background: #fff;
}

.tip-extra-question-card.is-invalid {
  border-color: var(--bs-danger);
  box-shadow: 0 0 0 .18rem rgba(220,53,69,.12);
}

.tip-extra-question-title {
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tip-extra-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
}

.tip-extra-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.tip-extra-choice-option,
.tip-extra-team-option {
  display: block;
  cursor: pointer;
  height: 100%;
}

.tip-extra-choice-option input,
.tip-extra-team-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tip-extra-choice-card {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  padding: .75rem .85rem;
  background: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.tip-extra-team-card {
  height: 100%;
  min-height: 74px;
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  padding: .55rem .45rem;
  background: #fff;
  text-align: center;
  display: grid;
  align-content: center;
  gap: .25rem;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.tip-extra-choice-option input:checked + .tip-extra-choice-card,
.tip-extra-team-option input:checked + .tip-extra-team-card {
  border-color: var(--bs-primary);
  background: rgba(13,110,253,.08);
  box-shadow: 0 0 0 .16rem rgba(13,110,253,.18);
}

.tip-extra-team-name {
  font-weight: 700;
  line-height: 1.12;
  font-size: .92rem;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .tip-extra-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tip-extra-team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .tip-extra-team-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .tip-extra-team-card {
    min-height: 70px;
  }

  .tip-extra-team-name {
    font-size: .88rem;
  }

  .tip-extra-flag {
    transform: scale(.40);
  }
}

/*
 * Tipsformulär: grupplaceringar
 * Ursprung: /user/tip_groups.php
 */

.tip-group-flag {
  transform: scale(.58);
  transform-origin: center center;
  margin: 0;
}

.tip-group-position-card {
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  padding: .85rem;
  background: #fff;
}

.tip-group-position-card.is-invalid {
  border-color: var(--bs-danger);
}

.tip-group-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.tip-group-team-option {
  display: block;
  cursor: pointer;
  height: 100%;
}

.tip-group-team-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tip-group-team-card {
  height: 100%;
  min-height: 116px;
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  padding: .75rem .5rem;
  text-align: center;
  display: grid;
  align-content: center;
  gap: .35rem;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.tip-group-team-option input:checked + .tip-group-team-card {
  border-color: var(--bs-primary);
  background: rgba(13,110,253,.08);
  box-shadow: 0 0 0 .18rem rgba(13,110,253,.18);
}

.tip-group-team-name {
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .tip-group-team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .tip-group-team-card {
    min-height: 108px;
  }

  .tip-group-team-name {
    font-size: .95rem;
  }

  .tip-group-flag {
    transform: scale(.55);
  }
}

/*
 * Tipsformulär: matchtips
 * Ursprung: /user/tip_matches.php
 */

.tip-match-meta {
  display: grid;
  gap: .15rem;
  font-size: .95rem;
}

.tip-match-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "homeflag spacer awayflag"
    "homename namesep awayname"
    "homegoal goalsep awaygoal"
    "sign sign sign";
  column-gap: .75rem;
  row-gap: .65rem;
  align-items: center;
}

.tip-match-home-flag {
  grid-area: homeflag;
  text-align: center;
}

.tip-match-away-flag {
  grid-area: awayflag;
  text-align: center;
}

.tip-match-home-name {
  grid-area: homename;
  text-align: center;
  font-weight: 700;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tip-match-away-name {
  grid-area: awayname;
  text-align: center;
  font-weight: 700;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tip-match-name-sep {
  grid-area: namesep;
  text-align: center;
  font-weight: 700;
  opacity: .65;
}

.tip-match-home-goal {
  grid-area: homegoal;
}

.tip-match-away-goal {
  grid-area: awaygoal;
}

.tip-match-goal-sep {
  grid-area: goalsep;
  text-align: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.tip-match-sign {
  grid-area: sign;
}

.tip-match-score-input {
  max-width: 6.5rem;
  margin-left: auto;
  margin-right: auto;
}

.tip-match-flag {
  transform: scale(.58);
  transform-origin: center center;
  margin: 0;
}

@media (max-width: 576px) {
  .tip-match-layout {
    column-gap: .45rem;
    row-gap: .6rem;
  }

  .tip-match-home-name,
  .tip-match-away-name {
    font-size: .98rem;
  }

  .tip-match-score-input {
    max-width: 5.8rem;
  }

  .tip-match-flag {
    transform: scale(.55);
  }
}

/*
 * Tipsformulär: slutspelssteg
 * Ursprung: /user/tip_stages.php
 */

.tip-stage-flag {
  transform: scale(.42);
  transform-origin: center center;
  margin: 0;
}

.tip-stage-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.tip-stage-team-option {
  display: block;
  cursor: pointer;
  height: 100%;
}

.tip-stage-team-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tip-stage-team-card {
  height: 100%;
  min-height: 74px;
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  padding: .55rem .45rem;
  text-align: center;
  display: grid;
  align-content: center;
  gap: .25rem;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, opacity .15s ease;
}

.tip-stage-team-option input:checked + .tip-stage-team-card {
  border-color: var(--bs-primary);
  background: rgba(13,110,253,.08);
  box-shadow: 0 0 0 .16rem rgba(13,110,253,.18);
}

.tip-stage-team-option input:disabled:not(:checked) + .tip-stage-team-card {
  opacity: .45;
}

.tip-stage-team-name {
  font-weight: 700;
  line-height: 1.12;
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.tip-stage-team-group {
  font-size: .78rem;
  color: var(--bs-secondary-color);
  font-weight: 650;
}

.tip-stage-counter {
  font-weight: 700;
}

@media (min-width: 768px) {
  .tip-stage-team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .tip-stage-team-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .tip-stage-team-card {
    min-height: 70px;
  }

  .tip-stage-team-name {
    font-size: .88rem;
  }

  .tip-stage-flag {
    transform: scale(.40);
  }
}

/*
 * Tipsformulär: sammanfattning
 * Ursprung: /user/tip_summary.php
 */

.tip-summary-flag {
  transform: scale(.40);
  transform-origin: center center;
  margin: 0;
}

.tip-summary-section {
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  background: #fff;
  overflow: hidden;
}

.tip-summary-section-header {
  padding: .9rem 1rem;
  background: rgba(0,0,0,.03);
  border-bottom: 1px solid var(--ft-border-color);
}

.tip-summary-section-body {
  padding: 1rem;
}

.tip-summary-match-card {
  border: 1px solid var(--ft-border-color);
  border-radius: var(--ft-radius-lg);
  padding: .85rem;
  background: #fff;
}

.tip-summary-match-meta {
  display: grid;
  gap: .15rem;
  font-size: .9rem;
  color: var(--bs-secondary-color);
  margin-bottom: .75rem;
}

.tip-summary-match-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "homeflag spacer awayflag"
    "homename namesep awayname"
    "score score score";
  column-gap: .7rem;
  row-gap: .55rem;
  align-items: center;
}

.tip-summary-home-flag {
  grid-area: homeflag;
  text-align: center;
}

.tip-summary-away-flag {
  grid-area: awayflag;
  text-align: center;
}

.tip-summary-home-name {
  grid-area: homename;
  text-align: center;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tip-summary-away-name {
  grid-area: awayname;
  text-align: center;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tip-summary-name-sep {
  grid-area: namesep;
  text-align: center;
  font-weight: 700;
  opacity: .65;
}

.tip-summary-score-row {
  grid-area: score;
  text-align: center;
  font-weight: 800;
  font-size: 1.15rem;
}

.tip-summary-team-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .45rem;
}

.tip-summary-team-list-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem 0;
  font-weight: 600;
  border-bottom: 1px solid var(--ft-border-color-soft);
}

.tip-summary-team-list-item:last-child {
  border-bottom: 0;
}

.tip-summary-placement-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: center;
  padding: .45rem 0;
  border-bottom: 1px solid var(--ft-border-color-soft);
}

.tip-summary-placement-row:last-child {
  border-bottom: 0;
}

.tip-summary-position {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(13,110,253,.10);
  color: var(--bs-primary);
  font-weight: 800;
}

.tip-summary-missing {
  border-color: var(--bs-warning);
  background: rgba(255,193,7,.08);
}

@media (max-width: 576px) {
  .tip-summary-section-body {
    padding: .85rem;
  }

  .tip-summary-match-card {
    padding: .8rem;
  }

  .tip-summary-match-layout {
    column-gap: .45rem;
  }

  .tip-summary-home-name,
  .tip-summary-away-name {
    font-size: .9rem;
  }
}