/**
 * @file
 * Detail financniho subjektu (cnb_money_subject_detail) - dle penizenauteku.cz.
 *
 * Doplnuje pravidla, ktera puvodni web mel v page-specific inline <style> +
 * hlavnim CSS, ale nase main.css je nemela: mrizka roli (.col-1/.col-4,
 * .jerrs-detail__cell), .jerrs-detail__*, .jerrs-choice*, hlavicka .header__info
 * a .header__back. Stranka dostava body--static (viz preprocess_html), takze
 * odsazeni hlavicky resi .body--static z main.css.
 *
 * Pozn.: puvodni web mel i pravidla scoped pod .body--jerrs-detail, ta se ale
 * ani na originalu neuplatnila (detail je body--static) - proto je nepridavame.
 */

/* Hlavicka: odkaz zpet. */
.header__back {
  display: none;
  position: relative;
  z-index: 12;
}

.header__back a {
  position: relative;
  display: inline-block;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.header__back a::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #333;
  transition: width 200ms;
}

.header__back a:hover::before {
  width: 100%;
}

/* Hlavicka: info polozky (adresa / ICO / LEI) vedle sebe. */
.header__info {
  margin-top: 35px;
}

.header__info__item {
  display: inline-block;
  margin-right: 30px;
  margin-bottom: 10px;
}

.header__info__item:last-of-type {
  margin-right: 0;
}

/* Posledni info polozka: main.css (ported) na ni dava svisly oddelovac
   (.header__info .header__info__item:last-of-type::before) a leve odsazeni.
   Puvodni web to na detailu rusi page-inline stylem - portujeme stejne, aby
   posledni polozka (napr. LEI) nemela oddelovac ani padding navic. */
.header__info .header__info__item:last-of-type {
  padding-left: 0;
}

.header__info .header__info__item:last-of-type::before {
  content: none;
}

.header__info__name {
  margin-bottom: 5px;
  font-size: 0.875rem;
}

.header__info__content {
  font-size: 1.125rem;
}

/* Sekce detailu. */
.jerrs-detail {
  padding: 30px 0 45px;
}

.jerrs-detail__item {
  margin-bottom: 60px;
}

.jerrs-detail__item:last-of-type {
  margin-bottom: 0;
}

.jerrs-detail__item a {
  text-decoration: underline;
}

.jerrs-detail__heading {
  position: relative;
  padding-left: 40px;
  margin-bottom: 15px;
  font-size: 1.875rem;
  line-height: 1.1;
}

.jerrs-detail__heading .icon {
  position: absolute;
  top: 0;
  left: 0;
}

.jerrs-detail__heading .icon--marker {
  width: 20px;
  height: 28px;
}

/* Radek = jedna role: col-1 (nazev) + col-4 bunky. */
.jerrs-detail__inner {
  display: flex;
  flex-wrap: wrap;
  padding: 20px 8px 20px 30px;
  margin-bottom: 20px;
  background: #eef3f4;
  border-radius: 9px;
}

.jerrs-detail__inner .col-1 {
  width: 100%;
  padding: 0 10px;
}

.jerrs-detail__inner .col-4 {
  width: 100%;
  padding: 0 10px;
}

.jerrs-detail__cell {
  margin-bottom: 20px;
}

.jerrs-detail__name {
  margin-bottom: 5px;
  font-size: 0.875rem;
}

.jerrs-detail__content {
  font-size: 1.125rem;
  font-weight: 600;
  color: #394142;
}

.jerrs-detail__content ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 5px;
}

.jerrs-detail__content ul li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9cfd2;
}

.jerrs-detail__content ul a {
  display: inline-block;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: underline;
}

/* Navigace pod detailem (predchozi / Vsechny vysledky / dalsi). */
.jerrs-choice {
  padding: 30px 0 40px;
  background: #e8cf67;
}

.jerrs-choice .container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.jerrs-choice__col {
  margin-bottom: 35px;
  text-align: center;
}

.jerrs-choice__col:last-of-type {
  margin-bottom: 0;
}

.jerrs-choice__col .icon {
  display: block;
  margin: 0 auto 20px;
  transition: transform 200ms;
}

.jerrs-choice__col:first-of-type .icon {
  transform: rotate(180deg);
}

.jerrs-choice__col:first-of-type:hover .icon {
  transform: rotate(180deg) translateX(7px);
}

.jerrs-choice__col:last-of-type:hover .icon {
  transform: translateX(7px);
}

.jerrs-choice__text {
  display: inline-block;
  max-width: 250px;
  font-family: "roboto-slab", Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
}

/* Neaktivni odkaz (predchozi/dalsi bez cile). */
.jerrs-not-active {
  pointer-events: none;
  cursor: default;
}

@media (min-width: 650px) {
  .jerrs-choice .container {
    flex-direction: row;
  }

  .jerrs-choice__col {
    margin-bottom: 0;
  }
}

@media (min-width: 800px) {
  .header__back {
    display: block;
  }

  .jerrs-detail {
    padding: 65px 0 90px;
  }

  .jerrs-detail__heading {
    margin-bottom: 30px;
  }

  .jerrs-detail__inner .col-4 {
    width: 25%;
  }

  .jerrs-choice {
    padding: 50px 0 60px;
  }

  .jerrs-choice__text {
    font-size: 1.875rem;
  }
}
