/* stylelint-disable color-function-notation */
/* stylelint-disable keyframes-name-pattern */
/* stylelint-disable selector-id-pattern */
/* stylelint-disable selector-class-pattern */
/* stylelint-disable custom-property-pattern */
/* stylelint-disable property-no-vendor-prefix */
:root {
  --ratingBgImage: url('./img/star-outline.svg');
  --ratingActiveBgImage: url('./img/star-filled.svg');
  --focusOutlineColor: #4e8af4;
  --focusOutline: 2px solid var(--focusOutlineColor);
  --commentBgColor: #fff;
  --sendEnabledColor: #505050;
  --sendDisabledColor: #bcbcbc;
  --sendHoverColor: hsl(0%, 0%, 0%);
  --tooltipBackground: #747474;
  --tooltipText: #fff;
  --tooltipTransitionTime: 0.3s;
  --tooltipZIndex: 50;
  --ratingCommentsHeight: 81px;
  --ctaCommentHeight: 22px;
  --commentFieldsHeight: calc(var(--ratingCommentsHeight) + var(--ctaCommentHeight));
}

.hlx-ReviewWrapper {
  display: flex;
  animation: fadeIn 0.5s;
  flex-direction: column;
  align-items: center;
}

.hlx-ReviewWrapper :focus {
  outline-color: var(--focusOutlineColor);
}

.hlx-ReviewWrapper h3,
.hlx-ReviewWrapper .hlx-reviewTitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 0;
  max-width: 80%;
  text-align: center;
}

.hlx-Review {
  display: flex;
  flex-direction: column;
}

.hlx-Review-ratingFields,
.hlx-Review-commentFields {
  padding: 0;
  margin: 0;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hlx-Review-ratingFields label {
  -webkit-appearance: none;
  appearance: none;
  visibility: collapse;
  width: 0;
}

.hlx-Review-ratingFields input[name='rating'] {
  padding: 0 0 0 5px;
  background-image: var(--ratingBgImage);
  background-size: 100%;
  background-repeat: no-repeat;
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
}

.hlx-Review-ratingFields input[name='rating']:first-child {
  padding-left: 0;
}

.hlx-Review-ratingFields input[name='rating']:focus {
  outline: none;
}

.hlx-Review-ratingFields input[name='rating'].has-keyboard-focus {
  outline: 2px solid #4e8af4;
}

.hlx-Review-ratingFields input[name='rating'].is-Active {
  background-image: var(--ratingActiveBgImage);
}

.hlx-Review-ratingFields input[name='rating']::-ms-check {
  display: none;
}

.hlx-Review-ratingFields>legend {
  position: absolute;
  clip: rect(0 0 0 0);
}

.hlx-Review-commentFields {
  display: none;
  position: relative;
  margin-top: 12px;
  border-radius: 4px;
  border: 2px solid #b3b3b3;
  height: var(--commentFieldsHeight);
  box-sizing: content-box;
}

.hlx-Review-commentFields.has-focus {
  border: var(--focusOutline);
}

.hlx-Review-commentFields.is-Visible {
  display: block;
}

.hlx-Review-commentFields label {
  position: absolute;
  top: 0;
  left: 9px;
  font-size: 19px;
  color: #767676;
  pointer-events: none;
  transition: all 0.2s ease;
  font-style: italic;
}

.hlx-Review-commentFields input[type='submit'] {
  position: absolute;
  right: 17px;
  bottom: 0;
  width: auto;
  background: var(--commentBgColor);
  border: none;
  -webkit-appearance: none;
  appearance: none;
  font-weight: 700;
  color: var(--sendEnabledColor);
  font-size: 16px;
  text-align: right;
  padding: 1px 10px;
  cursor: pointer;
}

.hlx-Review-commentFields input[type='submit'][disabled] {
  color: var(--sendDisabledColor);
  cursor: default;
}

.hlx-Review-commentFields input[type='submit']:not([disabled]):hover {
  color: var(--sendHoverColor);
}

.hlx-Review-commentFields #ctaCover {
  background-color: var(--commentBgColor);
  top: calc(var(--commentFieldsHeight) - var(--ctaCommentHeight));
  cursor: text;
  height: var(--ctaCommentHeight);
  position: absolute;
  right: 17px;
  width: 94%;
}

.hlx-Review-commentFields textarea#rating-comments {
  width: 310px;
  height: var(--ratingCommentsHeight);
  border: none;
  outline: none;
  padding: 29px 8px 0;
  font-size: 16px;
  font-style: italic;
  box-sizing: border-box;
  resize: none;
  overflow: auto;
}

.hlx-Review-commentFields textarea#rating-comments.is-Visible {
  display: flex;
}

.hlx-Review-commentFields .comment-counter {
  color: #767676;
  font-size: var(--type-body-xs-size);
}

.hlx-ReviewStats {
  display: none;
  font-size: 16px;
  font-weight: 200;
  margin-top: 12px;
}

.hlx-ReviewStats.is-Visible {
  display: block;
}

.hlx-ReviewStats-outOf,
.hlx-ReviewStats-separator,
.hlx-ReviewStats-total,
.hlx-ReviewStats-vote {
  margin-left: 3px;
}

.hlx-ReviewStats-average,
.hlx-ReviewStats-separator:first-of-type,
.hlx-ReviewStats-outOf {
  font-weight: 700;
}

.hlx-submitResponse {
  font-size: 24px;
  text-align: center;
}

.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  top: 130%;
  margin-top: 15px;
  width: max-content;
  max-width: 200px;
  padding: 10px;
  border-radius: 4px;
  background: var(--tooltipBackground);
  color: var(--tooltipText);
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  opacity: 0;
  transition: var(--tooltipTransitionTime);
  visibility: hidden;
}

.tooltip::after {
  content: '';
  top: 100%;
  position: absolute;
  margin: 12px 1px 0;
  border: 5px solid var(--tooltipBackground);
  border-color: transparent transparent var(--tooltipBackground);
  opacity: 0;
  transition: var(--tooltipTransitionTime);
  visibility: hidden;
}

.tooltip.is-hovering::before,
.tooltip.is-hovering::after,
.tooltip.has-keyboard-focus::before,
.tooltip.has-keyboard-focus::after {
  opacity: 1;
  visibility: visible;
  z-index: var(--tooltipZIndex);
}

@media only screen and (min-width: 1200px) {
  .hlx-ReviewWrapper {
    flex-direction: row;
    justify-content: center;
  }

  .hlx-ReviewWrapper .hlx-reviewTitle {
    margin-bottom: 0;
    margin-top: 0;
    max-width: 500px;
    text-align: left;
  }

  .hlx-ReviewWrapper .hlx-Review {
    flex-direction: row;
    margin-left: 20px;
    margin-right: 20px;
  }

  .hlx-ReviewWrapper .hlx-ReviewStats {
    margin-top: initial;
  }

  .hlx-ReviewWrapper .hlx-Review-commentFields {
    margin-top: 0;
    margin-left: 19px;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}
