@import './../../../../sources/styles/include.scss';

$namespace: 'intec-universe';
$component: 'reviews';
$template: 'popup-1';

$form: #{$component}-form;
$field: #{$component}-field;
$message: #{$component}-message;
$rating: #{$component}-rating;

.ns-#{$namespace}.c-#{$component}.c-#{$component}-#{$template} {
  min-width: 450px;
  max-width: 450px;

  .#{$form}-fragment {
    & + * {
      margin-top: 32px;
    }
  }
  .#{$form}-section {
    & + * {
      margin-top: 24px;
    }
  }
  .#{$form}-submit {
    position: relative;
  }
  .#{$form}-submit-button {
    position: relative;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-width: 180px;
    padding: 20px 32px;
    z-index: 1;

    &[disabled] {
      background-color: #CCCCCC;
      border-color: #CCCCCC;
      cursor: not-allowed;

      &:hover {
        & + .#{$form}-submit-popup {
          display: inline-block;
        }
      }
    }
  }
  .#{$form}-submit-popup {
    display: none;
    position: absolute;
    top: -8px;
    left: 0;
    max-width: 216px;
    padding: 8px;
    background-color: #FFF;
    z-index: 2;
    @include box-shadow(0, 0, 24px, 0, rgba(27, 30, 37, 0.08));
    @include transform-translate(null, -100%);
  }
  .#{$form}-submit-popup-content {
    font-size: 12px;
    line-height: 1.25;
    color: #808080;
  }

  .#{$field}-label {
    display: block;
    font-size: 0;
  }
  .#{$field}-name {
    display: block;
    font-size: 13px;
    line-height: 1.39;

    & + .#{$field}-picture,
    & + .#{$field}-input {
      margin-top: 8px;
    }
  }
  .#{$field}-name-value {
    color: #808080;

    a {
      text-decoration: none;
      @include transition(.35s, color);
    }
  }
  .#{$field}-name-required {
    color: #E05757;
  }
  .#{$field}-picture {
    display: block;
    text-align: left;

    & + .#{$field}-input {
      margin-top: 8px;
    }
  }
  .#{$field}-input {
    min-width: 100%;
    max-width: 100%;
  }
  .#{$field}-input-error {
    border: 1px solid scale-color(#E05757, $lightness: 40%);
    @include transition(.35s, border-color);

    &:hover {
      border-color: #E05757;
    }
  }
  .#{$field}-captcha {
    .#{$field}-input {
      width: 180px;
      min-width: auto;
      max-width: none;
    }
  }

  .#{$rating} {
    display: block;

    [data-role='rating.information'] {
      display: none;

      &[data-active='true'] {
        display: block;
      }
    }
  }
  .#{$rating}-item {
    display: block;
    cursor: pointer;

    svg {
      path {
        fill: #E8E8E8;
        stroke: #E8E8E8;
        @include transition(.35s, (fill, stroke));
      }
    }

    &[data-active='true'],
    &[data-hover='true'] {
      svg {
        path {
          fill: #FBCD56;
          stroke: #FBCD56;
        }
      }
    }
    &[data-active='true'][data-hover='true'] {
      svg {
        path {
          fill: lighten(#FBCD56, 15%);
          stroke: lighten(#FBCD56, 15%);
        }
      }
    }
  }
  .#{$rating}-caption {
    font-size: 14px;
    line-height: 1;
    color: #404040;
  }
  .#{$rating}-caption-separator {
    display: block;
    width: 8px;
    border-bottom: 1px solid #404040;
  }

  .#{$message} {
    font-size: 18px;
    line-height: 24px;
  }
  .#{$message}-neutral {
    color: #808080;
  }
  .#{$message}-success {
    color: #1DB940;
  }

  @include breakpoint-custom(600) {
    min-width: auto;
    max-width: none;

    .#{$rating}-item {
      &[data-active='true'][data-hover='true'] {
        svg {
          path {
            fill: #FBCD56;
            stroke: #FBCD56;
          }
        }
      }
    }
  }
}