/* Herbatica - product detail layout, panels, ratings and critical pre-paint rules */

body.type-detail .p-detail-tabs-wrapper > .shp-tabs-row {
  display: none !important;
}

body.type-detail #description .description-inner {
  display: block !important;
}

body.type-detail #description .basic-description {
  width: 100% !important;
  max-width: none !important;
}

body.type-detail .extended-description {
  visibility: hidden !important;
}

body.type-detail #tab-params .extended-description {
  visibility: visible !important;
}

body.type-detail .p-info-wrapper .kn_container {
  visibility: hidden !important;
}

body.type-detail .p-image-wrapper > .kn_container,
body.type-detail .p-short-description > .kn_container {
  visibility: visible !important;
}

body.type-detail .hb-product-stack {
  display: block !important;
  overflow: visible !important;
}

body.type-detail .hb-product-section {
  display: block !important;
  float: none !important;
  clear: both;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 32px;
  opacity: 1 !important;
  visibility: visible !important;
  border-top: 1px solid #e4e9ee;
  font-family: "Open Sans", Arial, sans-serif;
}

body.type-detail #description.hb-product-section {
  max-width: none;
  padding: 0;
  padding-top: max(20px, calc((100% - 1180px) / 2)) !important;
  border-top: 0;
}

body.type-detail #manufacturerDescription {
  display: none !important;
}

body.type-detail .hb-product-section > h2 {
  margin: 0 0 28px !important;
  color: #071b34;
  font-family: "Open Sans", Arial, sans-serif !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

body.type-detail #tab-params .extended-description > h3:first-child,
body.type-detail #description .basic-description > h3:first-child {
  display: none !important;
}

body.type-detail .hb-product-section .detail-parameters {
  width: 100%;
  margin: 0 !important;
  border-collapse: collapse;
}

body.type-detail .hb-product-section .detail-parameters th,
body.type-detail .hb-product-section .detail-parameters td {
  padding: 16px 18px;
  border: 1px solid #dce3e9;
  text-align: left;
  vertical-align: top;
}

body.type-detail .hb-product-section .detail-parameters th {
  width: 28%;
  background: #eaf2f8;
  color: #071b34;
  font-weight: 700;
}

body.type-detail #tab-params .detail-parameters tr:first-child {
  display: none;
}

body.type-detail #otherInformation,
body.type-detail #tab-params {
  margin-top: 28px;
  padding: 48px 32px;
  border: 0;
  border-radius: 24px;
  background: #f8f4ea;
}

body.type-detail #otherInformation .detail-parameters,
body.type-detail #tab-params .detail-parameters {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

body.type-detail #otherInformation .detail-parameters th,
body.type-detail #tab-params .detail-parameters th {
  background: #eaf2f8;
}

body.type-detail #ratingTab {
  margin-top: 28px;
  padding: 48px 32px;
  border: 0;
  border-radius: 24px;
  background: #f8f4ea;
  scroll-margin-top: 150px;
}

body.type-detail #ratingTab #ratingWrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 40px;
  align-items: center;
  padding: 36px 40px;
  border-radius: 24px;
  background: #fff;
}

body.type-detail #ratingTab .rate-wrap {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr);
  gap: 34px;
  align-items: center;
}

body.type-detail #ratingTab .rate-average-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

body.type-detail #ratingTab .rate-average {
  color: #071b34;
  font-size: 60px;
  font-weight: 700;
  line-height: 1;
}

body.type-detail #ratingTab .rate-star-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.type-detail #ratingTab .stars--productDetail .star::before,
body.type-detail #ratingTab .vote-rating .star::before {
  color: #d9ad45 !important;
}

body.type-detail #ratingTab .stars--productDetail .star::before {
  font-size: 20px;
}

body.type-detail #ratingTab .stars-label {
  color: #5f6b78;
  font-size: 14px;
}

body.type-detail #ratingTab .votes {
  min-width: 280px;
}

body.type-detail #ratingTab .rate-list {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
  margin: 5px 0;
}

body.type-detail #ratingTab .rate-star {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #071b34;
}

body.type-detail #ratingTab .rate-block {
  min-width: 0;
}

body.type-detail #ratingTab .rate-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #efe4c5;
}

body.type-detail #ratingTab .rate-bar::before {
  content: "";
  display: block;
  width: var(--rate-bar-width);
  height: 100%;
  border-radius: inherit;
  background: #d9ad45;
}

body.type-detail #ratingTab .rate-count {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%);
  color: #5f6b78;
  font-size: 13px;
  white-space: nowrap;
}

body.type-detail #ratingTab .add-comment {
  margin: 0;
}

body.type-detail #ratingTab .add-comment .btn {
  min-height: 48px;
  padding: 12px 24px;
  border: 0 !important;
  border-radius: 999px;
  background: #071b34 !important;
  color: #fff !important;
  font-weight: 700;
  text-transform: none;
}

body.type-detail #ratingTab .vote-form {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(7, 27, 52, 0.12);
}

body.type-detail #ratingTab #ratingsList {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

body.type-detail #ratingTab .vote-wrap {
  margin: 0;
  padding: 24px;
  border: 1px solid #e4e9ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 39, 63, 0.035);
}

body.type-detail #ratingTab .vote-pic {
  background: transparent !important;
}

body.type-detail #ratingTab .vote-initials {
  border-radius: 50%;
  background: #1f568d !important;
  color: #fff !important;
}

body.type-detail #ratingTab .vote-name {
  color: #071b34;
  font-weight: 700;
}

body.type-detail #ratingTab .vote-time,
body.type-detail #ratingTab .vote-content {
  color: #5f6b78;
}

body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) {
  display: grid !important;
  grid-template-columns: 1fr;
}

body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > h2 {
  grid-row: 1;
  grid-column: 1;
}

body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > #ratingWrapper,
body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > p {
  grid-row: 2;
  grid-column: 1;
}

body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > p {
  z-index: 2;
  align-self: center;
  max-width: 620px;
  margin: 0 40px;
  padding-right: 260px;
  color: #42536a;
  font-size: 17px;
  line-height: 1.65;
}

body.type-detail #ratingTab:has(#rate-form.visible) > p[data-testid="textCommentNotice"] {
  display: none !important;
}

body.type-detail #ratingTab #ratingWrapper:has(#rate-form.visible) {
  display: block;
  padding: 40px;
  background: #f8f4ea;
}

body.type-detail #ratingTab #ratingWrapper:has(#rate-form.visible) > .rate-wrap,
body.type-detail #ratingTab #ratingWrapper:has(#rate-form.visible) > .add-comment {
  display: none !important;
}

body.type-detail #ratingTab #rate-form.visible {
  display: block !important;
  padding: 0;
  border: 0;
}

body.type-detail #ratingTab #formRating {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

body.type-detail #ratingTab #formRating .form-legend,
body.type-detail #ratingTab #formRating .form-group:has(#ratingMessage),
body.type-detail #ratingTab #formRating .rating-stars-group,
body.type-detail #ratingTab #formRating .form-group:last-child {
  grid-column: 1 / -1;
}

body.type-detail #ratingTab #formRating .form-legend {
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(7, 27, 52, 0.12);
  color: #6a7684;
  font-size: 14px;
  text-align: left;
}

body.type-detail #ratingTab #formRating .form-group {
  margin: 0;
}

body.type-detail #ratingTab #formRating label {
  display: block;
  margin: 0 0 8px;
  color: #071b34;
  font-size: 15px;
  font-weight: 600;
}

body.type-detail #ratingTab #formRating .form-control {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #d8e0e7;
  border-radius: 12px;
  background: #fff;
  color: #071b34;
  font: 16px/1.5 "Open Sans", Arial, sans-serif;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.type-detail #ratingTab #formRating textarea.form-control {
  height: auto;
  min-height: 150px;
  padding: 14px 16px;
  resize: vertical;
}

body.type-detail #ratingTab #formRating .form-group:has(#ratingMessage) .form-control-wrapper {
  width: 100%;
  max-width: none;
}

body.type-detail #ratingTab #formRating .form-control:focus {
  border-color: #1f568d;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 86, 141, 0.12);
}

body.type-detail #ratingTab #formRating .rating-stars-description {
  max-width: 680px;
  margin: 0 0 14px;
  color: #42536a;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}

body.type-detail #ratingTab #formRating .rating-stars-wrapper {
  display: flex;
  gap: 4px;
}

body.type-detail #ratingTab #formRating .rating-star {
  margin: 0;
  color: #d9ad45;
}

body.type-detail #ratingTab #formRating .rating-star::before {
  color: #d9ad45 !important;
}

body.type-detail #ratingTab #formRating [data-testid="buttonSendRating"] {
  min-height: 50px;
  padding: 13px 26px;
  border: 0 !important;
  border-radius: 999px;
  background: #071b34 !important;
  color: #fff !important;
  font-weight: 700;
  text-transform: none;
}

body.type-detail .products-related-header,
body.type-detail .hodnoceni::before,
body.type-detail .dkLabVisitedProductsBox > h2 {
  display: block;
  margin: 0 0 28px !important;
  color: #071b34 !important;
  font-family: "Open Sans", Arial, sans-serif !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

body.type-detail .products-related-header,
body.type-detail .hodnoceni,
body.type-detail .dkLabVisitedProductsBox {
  width: 100%;
  max-width: none;
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

@media (max-width: 900px) {
  body.type-detail #ratingTab #ratingWrapper {
    grid-template-columns: 1fr;
  }

  body.type-detail #ratingTab .add-comment {
    justify-self: start;
  }

  body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > p {
    align-self: start;
    margin: 28px 20px 0;
    padding: 0;
  }

  body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > #ratingWrapper {
    padding-top: 90px;
  }
}

@media (max-width: 820px) {
  body.type-detail .hb-product-section {
    padding: 42px 20px;
  }

  body.type-detail .hb-product-section > h2,
  body.type-detail .products-related-header,
  body.type-detail .hodnoceni::before,
  body.type-detail .dkLabVisitedProductsBox > h2 {
    font-size: 27px !important;
  }

  body.type-detail .hb-product-section .detail-parameters th,
  body.type-detail .hb-product-section .detail-parameters td {
    display: block;
    width: 100%;
    padding: 13px 14px;
  }
}

@media (max-width: 700px) {
  body.type-detail #ratingTab #ratingWrapper:has(#rate-form.visible) {
    padding: 28px 20px !important;
  }

  body.type-detail #ratingTab #formRating {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body.type-detail #ratingTab #formRating .form-legend,
  body.type-detail #ratingTab #formRating .form-group {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  body.type-detail #ratingTab {
    padding: 36px 20px;
    border-radius: 20px;
  }

  body.type-detail #ratingTab #ratingWrapper {
    padding: 26px 20px;
  }

  body.type-detail #ratingTab .rate-wrap {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body.type-detail #ratingTab .rate-average {
    font-size: 50px;
  }

  body.type-detail #ratingTab .votes {
    min-width: 0;
    padding-right: 28px;
  }

  body.type-detail #ratingTab .vote-wrap {
    padding: 20px;
  }

  body.type-detail #otherInformation,
  body.type-detail #tab-params {
    padding: 36px 20px;
    border-radius: 20px;
  }

  body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > p {
    margin-top: 24px;
    font-size: 16px;
  }

  body.type-detail #ratingTab:has(> p[data-testid="textCommentNotice"]) > #ratingWrapper {
    padding-top: 100px;
  }
}
