/* Product detail: what sits inside the panes under the tab bar. The tab bar
   itself and the description grid are styled in stavtrans.css. */

/* Every pane starts and ends at the same distance from the tab bar, whatever
   it holds, and is centred under the tabs, text included: the content is
   rarely wide enough to fill the page, and anything set to the left hangs off
   to one side of the centred tab bar. */
.st-tab-panes > .tab-pane {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0 56px;
  text-align: center;
}

/* Lists, parameter rows, written reviews and form fields read from the left. */
.st-tab-panes ul,
.st-tab-panes ol,
.st-tab-panes table,
.st-review-fields { text-align: left; }

/* Popis / Parametry holds long feed texts and parameter tables, so its pane
   takes the full page content width like the rest of the product page; the
   two columns share it and keep their text set from the left. */
.st-tab-panes > #tab-description { max-width: none; }

.st-tab-panes .st-tab-grid { text-align: left; }

@media (min-width: 1200px) {
  .st-tab-panes .st-tab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1199px) {
  .st-tab-panes .st-tab-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Headings and lists inside a product description (Výhody, Rozsah dodávky). */
.st-tab-grid h4 {
  margin: 28px 0 12px;
  color: #000;
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
}

.st-tab-grid ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.st-tab-grid li + li { margin-top: 6px; }

/* No frame around a focused tab: a focused tab is always the selected one,
   which the navy fill already shows, and the theme's halo read as the tab
   sitting out of line. */
.st-tabs .nav-link:focus-visible {
  outline: 0;
  box-shadow: none;
}

.st-tab-panes > .tab-pane > p,
.st-review p {
  margin: 0;
  color: #000;
  font-size: 16px;
  line-height: 24px;
}

/* ---- Review tab: the form opens from its button, stars take the rating ---- */

.st-review-open { margin-top: 20px; }
.st-review .st-btn { height: 44px; }

.st-review-fields {
  display: grid;
  gap: 16px;
  max-width: 640px;
  margin: 24px auto 0;
}

.st-review-fields[hidden] { display: none; }

.st-review-field {
  display: grid;
  gap: 8px;
}

.st-review-field > label,
.st-review-field > .st-rating-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

.st-review-field.required > label::after,
.st-review-field.required > .st-rating-label::after {
  content: ' *';
  color: #c62828;
}

/* The fields the account forms use. */
.st-review-field input[type="text"],
.st-review-field textarea {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #f5f5f5;
  font-size: 16px;
  line-height: 24px;
}

.st-review-field textarea {
  height: auto;
  min-height: 132px;
  padding: 10px 14px;
  resize: vertical;
}

.st-review-field .is-invalid { border-color: #c62828; }
.st-review-submit { justify-self: start; }

.st-rating {
  display: inline-flex;
  gap: 6px;
  justify-self: start;
}

.st-rating-star {
  position: relative;
  margin: 0;
  color: #d6d6d6;
  line-height: 0;
  cursor: pointer;
  transition: color .12s ease-out;
}

/* The radio stays in the page for keyboards and screen readers; the star is
   what shows. */
.st-rating-star input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.st-rating-star svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.st-rating-star:has(input:focus-visible) {
  outline: 2px solid var(--st-navy);
  outline-offset: 2px;
}

/* The chosen stars and, while pointing, the stars up to the pointer. */
.st-rating:not(:hover):has(.st-rating-star:nth-of-type(1) input:checked) .st-rating-star:nth-of-type(-n+1),
.st-rating:not(:hover):has(.st-rating-star:nth-of-type(2) input:checked) .st-rating-star:nth-of-type(-n+2),
.st-rating:not(:hover):has(.st-rating-star:nth-of-type(3) input:checked) .st-rating-star:nth-of-type(-n+3),
.st-rating:not(:hover):has(.st-rating-star:nth-of-type(4) input:checked) .st-rating-star:nth-of-type(-n+4),
.st-rating:not(:hover):has(.st-rating-star:nth-of-type(5) input:checked) .st-rating-star:nth-of-type(-n+5),
.st-rating:has(.st-rating-star:nth-of-type(1):hover) .st-rating-star:nth-of-type(-n+1),
.st-rating:has(.st-rating-star:nth-of-type(2):hover) .st-rating-star:nth-of-type(-n+2),
.st-rating:has(.st-rating-star:nth-of-type(3):hover) .st-rating-star:nth-of-type(-n+3),
.st-rating:has(.st-rating-star:nth-of-type(4):hover) .st-rating-star:nth-of-type(-n+4),
.st-rating:has(.st-rating-star:nth-of-type(5):hover) .st-rating-star:nth-of-type(-n+5) { color: var(--st-yellow); }

/* ---- Above the product name: the same label its card carries in listings ---- */

.st-product-badge {
  display: inline-flex;
  align-items: center;
  height: 25px;
  margin-bottom: 12px;
  padding: 0 18px;
  border-radius: 148px;
  background: var(--st-yellow);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-transform: uppercase;
}

.st-product-badge + .st-product-badge { margin-left: 6px; }

.st-product-badge-abra { background: var(--st-orange); }

.st-meta .st-meta-stock {
  color: var(--st-green);
  font-weight: 700;
}

.st-meta .st-meta-stock.is-out { color: var(--st-muted); }

/* Where "Podrobný popis" scrolls to: a little air above the tab bar. */
.st-tabs-bar { scroll-margin-top: 24px; }
