@import './../../../../sources/styles/include.scss';

$component: 'widget';
$template: 'contacts-1';

$feeedback: #{$component}-feedback;
$items: #{$component}-items;
$item: #{$component}-item;
$map: #{$component}-map;
$navigation: #{$component}-navigation;
$dots: #{$component}-dots;

.widget.c-#{$component}.c-#{$component}-#{$template} {
  .#{$component}-content {
    position: relative;
  }

  .#{$items} {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 2;
  }
  .#{$items}-container {
    position: relative;
    background-color: #17171d;
    pointer-events: all;
  }
  .#{$items}-section {
    order: 1;
  }
  .#{$items}-list {

  }

  .#{$item}-content {
    padding: 24px 32px;
    cursor: pointer;
    @include transition(.35s, background-color);
  }
  .#{$item}-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    color: #FFF !important;
  }
  .#{$item}-information {
    margin-top: 16px;
  }
  .#{$item}-information-item {
    font-size: 13px;
    line-height: 1.54;
    color: #E8E8E8 !important;
    
    & + .#{$item}-information-item {
       margin-top: 4px;
     }
    a {
      color: #E8E8E8 !important;
      text-decoration: none;
    }
  }

  .#{$feeedback} {
    width: 350px;
    padding: 24px 36px;
    overflow: hidden;
  }
  .#{$feeedback}-section {
    order: 2;

    & + .#{$items}-section {
      width: calc(100% - 350px);
    }
  }
  .#{$feeedback}-image {
    width: 56px;
    height: 56px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    @include border-radius(50%);

    &[data-lazyload-use='true'] {
      background-color: #C4C4C4;
    }
  }
  .#{$feeedback}-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.43;
    color: #FFF;

    & + .#{$feeedback}-buttons {
      margin-top: 8px;
    }
  }
  .#{$feeedback}-button {
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 10px 14px;
  }

  .#{$map} {
    position: relative;
    height: 750px;
    z-index: 1;
    @include transition(.35s, filter);

    &[data-gray='true'] {
      -webkit-filter: grayscale(1);
      filter: grayscale(1);

      &:hover {
        -webkit-filter: none;
        filter: none;
      }
    }

    .c-map-yandex-system {
      width: 100%!important;
      height: 750px!important;
    }
  }
  .#{$map}-container {
    height: 100%;

    &[data-state='disabled'] {
      display: none;
    }
    &[data-state='enabled'] {
      display: block;
    }

    .ymaps-controls-lefttop {
      top: auto;
      bottom: 0;

      & > ymaps {
        top: auto!important;
        left: 50%!important;
        right: auto!important;
        bottom: 20px!important;
        margin-left: -88px;
        background: #fff;
        @include border-radius(32px);
        @include box-shadow(0, 2px, 6px, 0, rgba(0, 0, 0, 0.2));
      }
    }
    .ymaps-b-zoom {
      width: 80px;
      height: 36px;
      padding: 6px 10px;

      &::before {
        content: '';
        position: absolute;
        top: 5px;
        right: 50%;
        bottom: 5px;
        width: 2px;
        background-color: #f5f5f5;
      }
    }
    .ymaps-b-zoom__scale {
      display: none;
    }
    .ymaps-b-zoom__button {
      display: inline-block;
      width: 30px;
      height: 26px;
      opacity: 0.6;

      &:hover {
        opacity: 1;
      }
    }
    .ymaps-b-zoom__button_type_minus {
      text-align: center;
      background-image: none;

      .ymaps-b-zoom__sprite {
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('svg/minus.svg');
        background-position: -6px -3px;
      }
    }
    .ymaps-b-zoom__button_type_plus {
      text-align: center;
      background-image: none;

      .ymaps-b-zoom__sprite {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('svg/plus.svg');
        background-position: -1px -3px;
      }
    }
    .ymaps-b-form-button {
      background-image: none;
      overflow: visible;
    }
    .ymaps-b-form-button__content {
      background-image: none;
    }
    .ymaps-b-form-button__left {
      background-image: none;
    }
    .ymaps-controls-righttop {
      top: auto;
      bottom: 0;

      & > ymaps {
        top: auto!important;
        left: 50%;
        right: auto!important;
        bottom: 20px!important;
        margin-left: 2px;
      }

      .ymaps-b-select {
        &.ymaps-b-select_control_listbox {
          position: relative;
          padding: 3px 0 3px 25px;
          background: #fff;
          @include border-radius(32px);
          @include box-shadow(0, 2px, 6px, 0, rgba(0, 0, 0, 0.2));

          &::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 5px;
            width: 25px;
            height: 25px;
            background-image: url('svg/shema.svg');
          }
        }
      }
    }
    .ymaps-b-select_state_opened {
      .ymaps-b-popupa_layout_yes {
        position: absolute;
        top: auto;
        left: 3px;
        bottom: 100%;
        margin-bottom: 3px;

        .ymaps-b-popupa__shadow {
          display: none;
        }
        .ymaps-b-popupa__body {
          border-radius: 8px;
          padding: 5px;
          @include box-shadow(0, 2px, 6px, 0, rgba(0, 0, 0, 0.2));
        }
      }
    }
  }

  .#{$navigation} {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 2;

    &.disabled {
      display: none;
    }
  }
  .#{$navigation}-button {
    position: absolute;
    top: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid;
    outline: none;
    cursor: pointer;
    pointer-events: all;
    @include border-radius(2px);
    @include transform-translate(null, -50%);
    @include transition(.35s, background-color);

    svg {
      path {
        stroke: #FFF;
      }
    }

    &.disabled {
      background-color: #E8E8E8!important;
      border-color: #E8E8E8!important;
    }
  }
  .#{$navigation}-button-left {
    left: -20px;
  }
  .#{$navigation}-button-right {
    right: -20px;
  }

  .#{$dots} {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -24px;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
  }
  .#{$dots}-content {
    font-size: 0;
    text-align: center;
    margin: -8px;

    &.disabled {
      display: none;
    }
  }
  .#{$dots}-item {
    display: inline-block;
    width: 8px;
    height: 8px;
    padding: 0;
    margin: 8px;
    background-color: #FFF;
    border: 1px solid #404040;
    outline: none;
    pointer-events: all;
    @include border-radius(50%);
    @include transition(.35s, (background-color, border-color));
  }

  .#{$items}-list,
  .#{$items}-content,
  .#{$item},
  .#{$item}-content,
  .owl-stage-outer,
  .owl-stage,
  .owl-item {
    height: 100%;
  }

  @include breakpoint-768() {
    .#{$items} {
      position: relative;
      top: 0;

      & > div {
        & > div {
          margin-left: 0;
          margin-right: 0;
        }
      }
    }
    .#{$items}-section {
      order: 2;
    }

    .#{$feeedback},
    .#{$item}-content {
      padding-left: 16px;
      padding-right: 16px;
    }

    .#{$feeedback} {
      width: auto;
    }
    .#{$feeedback}-section {
      order: 1;
    }

    .#{$map} {
      height: 450px;
      -webkit-filter: grayscale(0);
      filter: grayscale(0);

      .c-map-yandex-system {
        height: 450px !important;
      }
    }

    .#{$navigation} {
      display: none;
    }
    .#{$dots} {
      display: block;
    }
  }
}