@button-padding: 5px;
@images-folder: '/files/78/wincalc/images/'; // папка с картинками относительно корня сайта
@width: 940px; // общая ширина калькулятора
@module-space: 10px; // расстояние между модулями
@right-column-width: 500px; // ширина правой колонки
@label-column-width: 170px; // ширина колонки с подписями к полям
@left-column-width: @width - @right-column-width - @module-space;
@module-padding: 15px; // отступ между содержимым модуля и краями (верх и низ)
@module-padding2: 28px; // отступ между содержимым модуля и краями (лево и право)
@left-field-width: @left-column-width - @module-padding * 2 - @label-column-width - @internal-space; // ширина полей в левой колонке
@internal-space: 10px; // внутренний отступ

.disable-selection {
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;
}

.background_linear_gradient(@corner, @color1, @color2) {
  background-image: -o-linear-gradient(@corner, @color1, @color2);
  background-image: -moz-linear-gradient(@corner, @color1, @color2);
  background-image: -webkit-linear-gradient(@corner, @color1, @color2);
  background-image: -ms-linear-gradient(@corner, @color1, @color2);
}

.prop_transition(@property, @duration) {
  transition-property: @property;
  transition-duration: @duration;
  -o-transition-property: @property;
  -o-transition-duration: @duration;
  -webkit-transition-property: @property;
  -webkit-transition-duration: @duration;
  -moz-transition-property: @property;
  -moz-transition-duration: @duration;
}

.gray-button {
  display: inline-block;
  color: black;
  border-radius: 4px;
  border: 1px solid #aaa;
  background-color: #ddd;
  padding: @button-padding;
  cursor: pointer;
  .background_linear_gradient(top, #fff, #eee);
  box-shadow: inset 0px 0px 2px 0 #fff;
  text-shadow: 0px 1px 0px white;
  text-decoration: none;
  .disable-selection;

  &:hover {
    border: 1px solid #777;
    text-decoration: none;
  }

  &:active {
    .background_linear_gradient(top, #ddd, #eee);
    padding: @button-padding + 1px @button-padding @button-padding - 1px @button-padding;
    box-shadow: inset 0px 1px 3px 0 rgba(0, 0, 0, 0.50);
    text-decoration: none;
  }
}

.blue-button {
  .gray-button;
  .background_linear_gradient(top, #5af, #38f);
  color: white;
  text-shadow: 0px 1px 1px black;

  &:active {
    .background_linear_gradient(top, darken(#5af, 30%), #38f);
  }
}

.close-button {
  background-image: url('@{images-folder}close.png');
  width: 26px;
  height: 26px;
  cursor: pointer;
  &:hover {
    background-image: url('@{images-folder}close-hover.png');
  }
}

.wincalc {
  padding: 0;
  margin: 0;
  width: @width;

  line-height: 1;

  .wincalc-clear {
    clear: both;
  }

  .left-column {
    float: left;
    width: @left-column-width;
    margin: 0 @module-space 0 0;
  }

  .right-column {
    float: left;
    width: @right-column-width;
  }

  .box {
    position: relative;
    float: none;
    padding: @module-padding;
    h1 {
      position: relative;
      font-size: 21px;
      margin: 0px 0px @internal-space 0px;
      text-shadow: 0px 1px 0px white;
      line-height: 1;
      padding: 0;
      padding: 5px 0 5px 36px;
//      padding: 20px 20px 0px 20px;
//      margin-bottom: 10px;
    }
    .wincalc-mar {
      position: absolute;
      left: 0;
      top: 0;  
      bottom: 0;          
      width: 26px;          
    }
    .mar1 {
      background: url(/files/78/wincalc/images/calc-mar1.png) 0 50% no-repeat;
    }
    .mar2 {
      background: url(/files/78/wincalc/images/calc-mar2.png) 0 50% no-repeat;
    }
    .mar3 {
      background: url(/files/78/wincalc/images/calc-mar3.png) 0 50% no-repeat;
    }
    font-size: 14px;
    background: #eee;
    background: rgb(223,228,230);
    background: -moz-linear-gradient(top,  rgba(223,228,230,1) 0%, rgba(205,211,213,1) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(223,228,230,1)), color-stop(100%,rgba(205,211,213,1)));
    background: -webkit-linear-gradient(top,  rgba(223,228,230,1) 0%,rgba(205,211,213,1) 100%);
    background: -o-linear-gradient(top,  rgba(223,228,230,1) 0%,rgba(205,211,213,1) 100%);
    background: -ms-linear-gradient(top,  rgba(223,228,230,1) 0%,rgba(205,211,213,1) 100%);
    background: linear-gradient(to bottom,  rgba(223,228,230,1) 0%,rgba(205,211,213,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dfe4e6', endColorstr='#cdd3d5',GradientType=0 );


    /*box-shadow: inset 5px 5px 10px 0 rgba(0, 0, 0, 0.10);*/
    border-radius: 2px;
    margin-bottom: 10px;
  }

  .box-left-column {
    .box;
    /*.left-column;*/
    /*width: @left-column-width - @module-padding * 2;*/
  }

  .box-right-column {
    .box;
    .right-column;
    width: @right-column-width - @module-padding * 2;
  }

  .layout-select-block {
    height: 135px;
    .wincalc-module-body {  
      display: inline-block;    
      width: 240px !important;
    }
  }

  .options-block {
    &>h1 {
      margin-bottom:20px;
    }
    height: 260px;
  }

  .yellow {
    background-color: #fffd64;
  }

  .red {
    background-color: #fdd;
  }
  .price-box:after { 
    content: 'Стоимость изделия указана с учетом скидки, предоставляемой на остекление от 50 м\b2. Более подробную информацию спрашивайте у менеджеров';
    display: block;
    padding: 0 15px;
    position: absolute;
    left: 0;
    top: 65px;
    width: 605px;
    color: #2a2929;
    font-size: 12px;
    line-height: 1.2;
  }  
  .price-box {
    height: 45px;
    padding: 35px 15px;
    .wincalc-module-footer {
      position: relative;
      font-size: 80%;
      top: 15px;
      color: gray;
    }
 
    
    
    
//    footer
  }
  .wincalc-price-module h1 {
    padding: 0;
  }
  .wincalc-item-selector-module ul {
    list-style: none;
    padding: 0 0 0 0;
    margin: @internal-space 0px 0px 0px;
    img {
      padding: 0;
      margin: 0;
      border: 0px solid black;
    }

    .wincalc-current-item {
      background: rgb(180, 180, 180);
      box-shadow: inset 2px 2px 4px 0 rgba(0, 0, 0, 0.15);
    }

    li {
      display: inline-block;
      float: left;
      .prop_transition(background, 0.3s);
      border-radius: 4px;
      padding: 4px;
    }

    li:hover {
      background: rgb(220, 220, 220);
    }
  }

  .wincalc-combo-selector-module {
    h1 {
      width: @label-column-width;
      text-align: left;
      display: inline-block;
      font-weight: normal;
      font-size: 14px;
      margin: 0 @internal-space 0 0;
      text-shadow: none; 
      padding: 0;     
    }
    .wincalc-module-body {
      display: inline-block;
      width: 200px;
      div {
        display: inline;
      }
    }
    margin-bottom: @internal-space;
  }

  .toggle-field > .wincalc-module-body {
    text-align: left;
    font-size: 12px;
    float: left;
    width: @label-column-width;
    margin-right: @internal-space;

  }
  .toggle-field > .wincalc-child-modules {
    float: left;
    width: @left-field-width;
    height: 25px;
    line-height: 25px;
  }

  .toggle-field {
    height: 25px;
    cursor: pointer;

    a {
      .disable-selection;
      vertical-align: top;
      padding: 5px 0 0 20px;
      margin: 0 0px 0 0;
      width: 70px;
      height: 25px;
      line-height: 25px;
      background: url('@{images-folder}unchecked.png') 0 3px no-repeat;
      font-size: 14px;
      color: #2e3235;
    }
    a.wincalc-button-checked {
      background: url('@{images-folder}checked.png') 0 3px no-repeat;
    }
  }

  input {
    border-radius: 20px;
    border: 1px solid #aaa;
    background: white;
    padding: 2px;
    .prop_transition(background, 0.5s);
  }
  
  select {
    width: 100%;
    padding: 0;
    margin: 0;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    border: 1px solid #878e94;
    padding: 3px 5px;
    box-sizing: border-box;
	  -moz-box-sizing: border-box;
	  -webkit-box-sizing: border-box;
  }
  
  .wincalc-layout {
    @sizer-color: #bbb;

    position: relative;
    /*.prop_transition(background, 0.3s);*/

    .wincalc-layout-leaf {

      box-shadow: 2px 2px 30px rgba(0, 0, 0, 0.4);
    }

    .sizer-up, .sizer-down {
      border-left: 1px solid @sizer-color;
      border-right: 1px solid @sizer-color;
      height: 40px;
      input {
        width: 40px;
        text-align: center;
      }
    }

    .sizer-left, .sizer-right {
      width: 60px;
      border-top: 1px solid @sizer-color;
      border-bottom: 1px solid @sizer-color;
      input {
        width: 40px;
        text-align: center;
      }
    }

    .wincalc-error input {
      background-color: #fdd;
    }

    .sizer-up, .sizer-down, .sizer-left, .sizer-right {
    }

    .sizer-up {
      padding-bottom: 10px;
    }
    .sizer-left {
      padding-right: 20px;
    }
    .sizer-right {
      padding-left: 20px;
    }
    .sizer-down {
      padding-top: 10px;
    }

    .sizer-up-line, .sizer-down-line {
      border-top: 1px solid @sizer-color;
      height: 1px;
    }
    .sizer-left-line, .sizer-right-line {
      border-left: 1px solid @sizer-color;
      width: 1px;
    }

    .sizer-up-arrow1, .sizer-up-arrow2,
    .sizer-left-arrow1, .sizer-left-arrow2,
    .sizer-right-arrow1, .sizer-right-arrow2,
    .sizer-down-arrow1, .sizer-down-arrow2,
    {
      width: 13px;
      height: 13px;
    }
    .sizer-up-arrow1, .sizer-down-arrow1 {
      background: url('@{images-folder}arrows.png') 0px 26px;
    }
    .sizer-up-arrow2, .sizer-down-arrow2 {
      background: url('@{images-folder}arrows.png') 0px 13px;
    }
    .sizer-left-arrow1, .sizer-right-arrow1 {
      background: url('@{images-folder}arrows.png') 0px 0px;
    }
    .sizer-left-arrow2, .sizer-right-arrow2 {
      background: url('@{images-folder}arrows.png') 0px 39px;
    }
  }

  .full-width-column {
    clear: both;
    width: @width;
    position: relative;

  }

  .wincalc-layout-label {
    text-align: center;
    font-size: 90%;
    cursor: pointer;
    .disable-selection;
  }

  .wincalc-price {
    font-size: 25px;
    position: absolute;
    left: 70px;
    width: 220px;
    text-align: right;
    top: 32px;
    color: #007caf;
    font-weight: bold;
  }
  .wincalc-price:after {
    content: '*';
    display: block;
    position: absolute;
    right: -10px;
    top: -1px;
    width: auto;
    height: auto;
    color: #2e3235;
  }
  .wincalc-price span {
    color: #2e3235;
    font-weight: normal;
  }
  .box-right-column .wincalc-price {
    left: 270px;
    width: 200px;
    text-align: right;
    color: red;
  }

  .wincalc-add-to-basket-module a {
    display: block;
    width: 209px;
    position: absolute;
    right: 25px;
    top: 35px;
    /*.blue-button;*/
    background: #17abe8;
    background: -moz-linear-gradient(top,  #17abe8 0%, #0995cf 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#17abe8), color-stop(100%,#0995cf));
    background: -webkit-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
    background: -o-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
    background: -ms-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
    background: linear-gradient(to bottom,  #17abe8 0%,#0995cf 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#17abe8', endColorstr='#0995cf',GradientType=0 );
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    color: #fff;
    text-decoration: none;
    text-align: center;
    padding: 15px 0;
    font-weight: bold;
    &:active {
      padding: 16px 0px 14px 0px;
    }
  }

  .wincalc-errors-module {
    width: @width - @module-padding * 2;
  }

  .wincalc-basket-module {
    width: @width;
    padding: 0;
    background: transparent;
    .delete-row div {
      .close-button;
      margin-left: 10px;
    }
     h1 {
    display: none;
    }
    .wincalc-basket-item {
      margin-bottom: 3px;
      padding: 20px 17px;
      background: #e5e9ea;
      -webkit-border-radius: 2px;
      -moz-border-radius: 2px;
      border-radius: 2px;
    }
    .delete-row {
      float: right;
      width: 32px;
      margin: 0 10px;
    }
    .icon {
      float: left;
      width: 60px;
      margin-right: 10px;
    }

    .title {
      width: 455px;
      margin-bottom: 10px;
      float: left;
      font-size: 21px;      
    }
    .size {
      float: left;   
      margin-top: 4px;   
      font-size: 16px;
    }
    .wincalc-basket-content {
      overflow: hidden;
    }
    .price {
      float: right;
      font-size: 21px;
      font-weight: bold;
      color: #007CAF;
      padding-left: 10px;
        span {          
          color: #2e3235
        }
    }
    .total-price {
      float: left;
      font-size: 25px;
      font-weight: bold;
      color: #007CAF;
        span {          
          color: #2e3235;
          font-weight: normal;      
        }
    }
    .label-price {
      float: left;
      width: 172px;
      font-size: 21px;
    }
    .description {      
      clear: both;      
      font-size: 12px;
      color: #838383; 
      line-height: 14px;     
    }

    table {
      border-spacing: 0px;
      vertical-align: top;
    }
    
    td {
      vertical-align: top;
    }

    .delimiter {
      border-top: #777777 dashed 1px;
    }

    .total {
      text-align: right;
    }
  }

  .wincalc-send-order-module {
    height: 45px;
    padding: 35px 25px;
    border: 1px solid #fff;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
    background: rgb(223,227,230);
    background: -moz-linear-gradient(top,  rgba(223,227,230,1) 0%, rgba(206,211,213,1) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(223,227,230,1)), color-stop(100%,rgba(206,211,213,1)));
    background: -webkit-linear-gradient(top,  rgba(223,227,230,1) 0%,rgba(206,211,213,1) 100%);
    background: -o-linear-gradient(top,  rgba(223,227,230,1) 0%,rgba(206,211,213,1) 100%);
    background: -ms-linear-gradient(top,  rgba(223,227,230,1) 0%,rgba(206,211,213,1) 100%);
    background: linear-gradient(to bottom,  rgba(223,227,230,1) 0%,rgba(206,211,213,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dfe3e6', endColorstr='#ced3d5',GradientType=0 );

    a {
      display: block;
      float: right;
      width: 209px;          
      background: #17abe8;
      background: -moz-linear-gradient(top,  #17abe8 0%, #0995cf 100%);
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#17abe8), color-stop(100%,#0995cf));
      background: -webkit-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
      background: -o-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
      background: -ms-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
      background: linear-gradient(to bottom,  #17abe8 0%,#0995cf 100%);
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#17abe8', endColorstr='#0995cf',GradientType=0 );
      border: 1px solid #fff;
      -webkit-border-radius: 2px;
      -moz-border-radius: 2px;
      border-radius: 2px;
      color: #fff;
      text-decoration: none;
      text-align: center;
      padding: 15px 0;
      font-weight: bold;  
      &:active {
      padding: 16px 0px 14px 0px;
    }          
      }
    
  }
}

.wincalc-form-background {
  background-color: rgba(0, 0, 0, 0.3);

  z-index: 1000;
}

.wincalc-form {
  background: #eff2f3;
  padding: 20px 40px;
  box-shadow: 0px 0px 40px 0 rgba(0, 0, 0, 0.5);
  border-radius: 10px;

  .wincalc-form-send {
    /*.gray-button;
    margin-top: 10px;*/
    display: block;
    float: right;
    width: 209px;
    margin-top: 20px; 
    background: #17abe8;
    background: -moz-linear-gradient(top,  #17abe8 0%, #0995cf 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#17abe8), color-stop(100%,#0995cf));
    background: -webkit-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
    background: -o-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
    background: -ms-linear-gradient(top,  #17abe8 0%,#0995cf 100%);
    background: linear-gradient(to bottom,  #17abe8 0%,#0995cf 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#17abe8', endColorstr='#0995cf',GradientType=0 );     
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
    color: #fff;
    text-decoration: none;
    text-align: center;
    padding: 15px 0;
    font-weight: bold;
    cursor: pointer;
    &:active {
      padding: 16px 0px 14px 0px;
    }
  }
  .wincalc-pay {
    width: 313px;
    margin-top: 5px;
  }
  .wincalc-pay span {
    display: block;
    margin-bottom: 2px;
  }
  .wincalc-form-close {
    .close-button;
    position: absolute;
    top: 15px;
    left: 100%;
    margin-left: -36px;
  }

  input, textarea, select {
    width: 100%;
    box-sizing: border-box;
	  -moz-box-sizing: border-box;
	  -webkit-box-sizing: border-box;
    border-radius: 3px;
    border: 1px solid #878e94;    
    /*box-shadow: inset 2.5px 2.5px 5px 0 rgba(0, 0, 0, 0.2);*/
    padding: 5px;
  }
  .column {
    float: left;
    width: 355px;
    background: transparent;
  }
  .wincalc-line-edit-module {
    width: 313px;
  }
  .wincalc-form-contents {
    width: 710px;
  }

  .comment {
    width: 313px;
    textarea {
      width: 100%px;
      /*max-width: 300px;*/
      height: 160px;
      resize: vertical;
    }
  }

  .order {
    textarea {
      /*width: 340px;*/
      width: 100%;
      /*max-width: 340px;*/
      /*height: 300px;*/
      min-height: 373px;
      resize: vertical;
    }
  }

}

/*---------------------------*/

@media handheld, only screen and (max-width: 767px) {/*-MOBILE-*/
  /*-------------------------*/
  .wincalc-form-background {
      position: fixed !important;
      top: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      left: 0 !important;
      overflow-y: auto;
  }
  .wincalc-form {
      top: 10px !important;
      bottom: 10px;
      /*left: 0 !important;*/
      overflow-y: auto;
      /*-webkit-transform: translate(-50%,-50%);-moz-transform: translate(-50%,-50%);-ms-transform: translate(-50%,-50%);-o-transform: translate(-50%,-50%);transform: translate(-50%,-50%);*/
      .wincalc-form-contents {
          max-width: 270px;
          width: 100%;
      }
      .column {
          float: none;
          max-width: 270px;
          width: 100%;
      }
      .wincalc-child-modules {
          margin: 0 -15px;
      }
      .wincalc-line-edit-module,
      .wincalc-pay {
          display: inline-block;
          vertical-align: top;
          /*margin-right: -0.275em;*/
          width: 100%;
          padding: 5px 15px;
          -webkit-box-sizing: border-box;
          -moz-box-sizing: border-box;
          box-sizing: border-box;
      }
      .wincalc-pay {
          margin-top: 4px;

          select {
              padding-top: 4px;
              padding-bottom: 4px;
          }
      }
      .wincalc-text-edit-module {
          display: inline-block;
          vertical-align: top;
          /*margin-right: -0.275em;*/
          width: 100%;
          padding: 5px 15px;
          -webkit-box-sizing: border-box;
          -moz-box-sizing: border-box;
          box-sizing: border-box;

          textarea {
              resize: none;
              height: 90px;
              min-height: 90px;
              -webkit-box-sizing: border-box;
              -moz-box-sizing: border-box;
              box-sizing: border-box;
          }
      }
      .order {
          textarea {
              height: 180px;
              min-height: 180px;
          }
      }
      .wincalc-form-send {
          margin-bottom: 20px;
      }
  }
}