/**
 * Offer Hero Widget Styles
 *
 * @package WCRS
 * Tylko layout i zachowanie. Wartości wizualne w kontrolkach Elementor.
 */

.wcrs-offer-hero {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  width: 100%;
}

.wcrs-offer-hero__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: auto;
}

.wcrs-offer-hero__inner {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.wcrs-offer-hero__slots {
  display: flex;
  flex-direction: column;
}

.wcrs-offer-hero__slot {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Linia rozdziela wiersze, więc siedzi NAD każdym poza pierwszym — także nad
   blokiem rekrutacji, który jest takim samym wierszem, tylko o innym układzie.
   Przy liniach pod spodem ostatni wiersz kończyłby sekcję kreską wiszącą
   w powietrzu, a przy dostawianiu kolejnych bloków trzeba by pilnować, który
   akurat jest ostatni. */
.wcrs-offer-hero__slot + .wcrs-offer-hero__slot,
.wcrs-offer-hero__slots + .wcrs-offer-hero__recruitment {
  border-top-width: 1px;
  border-top-style: solid;
}

/* Wiersz bez etykiety to wezwanie do działania („Zgłoś się”), a nie dana —
   dlatego wyróżniony grubością, w odróżnieniu od zwykłych wartości. */
.wcrs-offer-hero__slot-value:only-child a {
  font-weight: 700;
}

.wcrs-offer-hero__slot-label {
  display: block;
}

.wcrs-offer-hero__slot-value {
  display: block;
}

.wcrs-offer-hero__slot-value a {
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  font-style: inherit;
  font-variant: inherit;
  font-optical-sizing: inherit;
  font-kerning: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  text-decoration: underline;
  /* keep the auto-appended arrow on the same line as the last word */
  display: inline;
}

/* Arrow automatically appended to linked info rows */
.wcrs-offer-hero__slot-arrow {
  display: inline-block;
  vertical-align: -0.125em;
  width: 1em;
  height: 1em;
  margin-left: 0.25em;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.wcrs-offer-hero__slot-value a:hover .wcrs-offer-hero__slot-arrow,
.wcrs-offer-hero__slot-value a:focus-visible .wcrs-offer-hero__slot-arrow {
  transform: translate(2px, -2px);
}

.wcrs-offer-hero__recruitment {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.wcrs-offer-hero__recruitment-label,
.wcrs-offer-hero__recruitment-date {
  display: inline-block;
}

/* „Rekrutacja do:” jest takim samym tytułem jak etykiety wierszy powyżej,
   więc dostaje ich krój — inaczej dziedziczy tekst strony i wygląda przy nich
   na przypadkowy. Wartości siedzą tu, a nie tylko w domyślnych kontrolki
   typografii, bo domyślne z grupy nie generują CSS, dopóki ktoś nie otworzy
   jej w edytorze; ustawienie z panelu i tak wygrywa wyższą specyficznością. */
.wcrs-offer-hero__recruitment-label {
  font-weight: 800;
  font-size: 16px;
  line-height: 26px;
}

.wcrs-offer-hero__progress {
  width: 100%;
  margin-top: 0.5rem;
}

.wcrs-offer-hero__progress-bar {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.wcrs-offer-hero__progress-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s ease;
}

.wcrs-offer-hero__visual {
  flex: 1 1 0%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  min-width: 0;
  overflow: hidden;
}

.wcrs-offer-hero__image {
  width: 100%;
  height: 100% !important;
  display: block;
  position: relative;
}

.wcrs-offer-hero__image img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center center;
  display: block;
  max-width: none;
}

@media (max-width: 991px) {
  .wcrs-offer-hero {
    flex-direction: column;
  }

  .wcrs-offer-hero__content {
    width: 100% !important;
  }

  .wcrs-offer-hero__visual {
    width: 100% !important;
    min-height: 300px;
  }

  .wcrs-offer-hero__image {
    height: 300px;
  }
}

@media (max-width: 767px) {
  .wcrs-offer-hero__recruitment {
    flex-direction: column;
    align-items: flex-start;
  }
}
