#setting_promotions {
  // * ----------------
  // มีบางส่วนใช้ร่วมกับ หน้า _setting.scss
  // ----------------

  .promotion {
    display: flex;
    align-items: center;
    font-size: 14px;
    div {
      padding: 5px 2px;
      text-align: center;
      &:first-child {
        padding-left: 0px;
      }
      &:nth-child(2) {
        text-align: left;
      }
    }
    input {
      width: 100%;
      border: 1px solid #ddd;
      border-radius: 3px;
      padding: 5px;
      // &[type='number']{
      // 	text-align: center;
      // }
    }
    select {
      width: 100%;
      border: 1px solid #ddd;
      border-radius: 3px;
      background: #fff;
      height: 2.4em;
      &:focus {
        outline: none;
      }
    }
    &__number {
      width: 3%;
      color: #888;
    }
    &__name {
      width: 40%;
      padding-right: 10px !important;
    }

    &_condition {
      width: 19%;
    }
    &_condition_value {
      width: 13%;
      padding-right: 10px !important;
      display: flex;
      align-items: center;
      position: relative;
      input {
        padding-right: 14px;
      }
      span {
        position: absolute;
        right: 15px;
        color: #888;
        font-size: 12px;
        background: #fff;
      }
    }
    &_discount_value {
      width: 13%;
    }
    &_discount_unit {
      width: 8%;
    }

    &__delete {
      width: 3%;
      cursor: pointer;
      display: flex;
      padding-right: 0 !important;
      img {
        width: 20px;
        height: 20px;
      }
    }
    &.header {
      color: #888;
      margin-bottom: 0;
      font-size: 13px;
      div {
        text-align: left;
      }
    }
  }
  .addScope {
    margin-top: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border: 1px dotted #004f9c;
    border-radius: 3px;
    color: #004f9c;
    display: flex;
    align-items: center;
    justify-content: center;
    svg {
      width: 15px;
      height: 15px;
      fill: #004f9c;
      margin-right: 10px;
    }
  }
  @media only screen and (max-width: 992px) {
    .promotion {
      flex-wrap: wrap;
      padding-bottom: 20px;
      border-bottom: 1px solid #ddd;
      margin-bottom: 15px;

      &__number {
        width: 10%;
        margin-bottom: 7px;
        font-size: 16px;
      }
      &__name {
        width: 90%;
        padding-right: 0 !important;
      }
      &_condition {
        width: 70%;
      }
      &_condition {
        width: 55%;
        margin-left: 10%;
      }
      &_condition_value {
        padding-right: 0 !important;
        width: 35%;
      }
      &_discount_value {
        margin-left: 10%;
        width: 30%;
      }
      &_discount_unit {
        width: 20%;
      }
      &__delete {
        width: 40%;
        justify-content: flex-end;
      }

      .header {
        width: 90%;
        margin-left: 10%;
        color: #888;
        font-size: 13px;
        text-align: left;
        padding: 10px 0 0 5px;
      }
    }
  }
}

#setting_shop_promotion_condition,
#setting_shop_promotion_code,
#setting_shop_promotion_segmented {

  .segmented{
    margin-top: 20px;
    &__title{
      font-size: 14px;
    }
    .dropdown-toggle{
      border: 1px solid #ccc;
    }
  }
  #segmented_detail{
    font-size: 14px;
  }

  .input__form {
    position: relative;

    input+label.error {
      display: none;
      position: absolute;
      right: 0px;
      font-size: 9px;
      bottom: -20px;
      color: #f22424;
      font-weight: lighter;
    }
    label{
      font-size: 14px;
      font-weight: lighter;
    }
  }

  // .input__name--box {
  //   width: 100%;
  // }

  .line-through {
    text-decoration: line-through;
  }
  .help-block.form-error {
    position: absolute;
    bottom: -22px;
    font-size: 9px;
    right: 0;
    color: red;
    font-weight: lighter;
  }

  .modal-dialog {
    display: flex;
    align-items: center;
    height: 100%;
    margin-top: 0;
    margin-bottom: 0;
  }

  .modal-content {
    width: 100%;
  }

  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  input[type="text"],
  input[type="number"] {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    padding: 6px 20px;
  }

  input[type="number"] {
    text-align: right;
  }

  .disabled {
    color: #c2c2c2;
  }

  .modal-header,
  .modal-footer {
    padding: 20px 40px;
  }
  .modal-body {
    padding: 0px;
  }
  .modal-title {
    font-size: 20px;
    font-weight: normal;
  }
  .page__condition {
    &--container {
      display: flex;
    }
    &--condition,
    &--result {
      width: 50%;
      padding: 20px 40px;
    }
    &--condition {
      border-right: 1px solid #e5e5e5;
    }
    &--title {
      font-size: 16px;
      font-weight: normal;
    }

    #condition_list,
    #result_list {
      font-size: 14px;
    }

    .modal-footer {
      text-align: center;
    }
  }

  .page__detail {
    .sym__thb {
      position: relative;
      display: flex;
      align-items: center;
      &::before {
        content: "฿";
        position: absolute;
        left: 10px;
        font-size: 16px;
      }
    }

    .sym__km {
      position: relative;
      display: flex;
      align-items: center;
      &::before {
        content: "km";
        position: absolute;
        left: 10px;
        font-size: 16px;
      }
    }

    .form-input {
      margin-bottom: 10px;
      div {
        font-size: 14px;
        margin-bottom: 5px;
      }
      input {
        width: 100%;
        font-size: 20px;
      }

      .input__name {
        width: 100%;
      }
    }

    .maindetail__container {
      display: flex;
      justify-content: space-between;

      .code__container,
      .limit__container {
        display: flex;
        align-items: center;
      }

      .code {
        // &__container {
        //   width: 60%;
        // }
        &__code {
          min-width: 158px;
          max-width: 158px;
          &--input {
            position: relative;
            display: flex;
            align-items: center;
            &.success::before {
              position: absolute;
              right: 0;
              content: "";
              display: inline-block;
              width: 16px;
              height: 16px;
              background-color: #9bb700;
              mask: url(../../imgs/icon_input_success.svg) no-repeat center;
              -webkit-mask: url(../../imgs/icon_input_success.svg) no-repeat center;
              mask-size: contain !important;
              -webkit-mask-size: contain !important;
              margin-right: 10px;
            }
            &.error::before {
              position: absolute;
              right: 0;
              content: "";
              display: inline-block;
              width: 16px;
              height: 16px;
              background-color: #e84848;
              mask: url(../../imgs/icon_input_error.svg) no-repeat center;
              -webkit-mask: url(../../imgs/icon_input_error.svg) no-repeat center;
              mask-size: contain !important;
              -webkit-mask-size: contain !important;
              margin-right: 10px;
            }
            input {
              text-transform: uppercase;
            }
            .err__msg {
              position: absolute;
              right: 0;
              top: 43px;
              font-size: 9px;
              color: red;
              font-weight: lighter;
            }
          }
        }
        &__desc {
          width: 50%;
        }
        &__desc {
          font-size: 12px;
          line-height: 1.3;
          margin-top: 10px;
          margin-left: 10px;
          font-weight: lighter;
          color: #808080;
          &--random {
            font-weight: normal;
            color: #004f9c;
            text-decoration: underline;
          }
        }
      }

      .limit__container {
        // width: 40%;
        font-size: 16px;
        justify-content: space-between;
        margin-top: 10px;

        .limit__checkbox {
          margin-right: 10px;
        }
      }

      .input__quantity {
        width: 60px;
        font-size: 14px;
        padding: 5px 0;
        border-radius: 4px;
        border: 1px solid #e5e5e5;
        text-align: center;
        font-weight: lighter;
      }
    }

    &--container {
      display: flex;
      .condition__container,
      .result__container {
        width: 50%;
      }

      .condition__section,
      .result__section {
        min-height: 210px;
        height: 100%;
        padding: 20px 40px;

        &--title {
          font-size: 18px;
          font-weight: normal;
          margin-bottom: 20px;
        }
        &--section {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 20px;
        }
      }
      .condition__section {
        border-right: 1px solid #e5e5e5;
        padding-right: 30px;
      }
      .result__section {
        padding-left: 30px;
      }

      #condition_none {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #bcbcbc;
        font-style: italic;
      }

      .totalprice,
      .product,
      .deliveryfee {
        &__type {
          border: 1px solid #e5e5e5;
          border-radius: 4px;
          .dropdown {
            span.text {
              padding-right: 0px;
            }
            .btn {
              padding: 7px 10px;
              max-width: 49px;
              min-width: 49px;
              font-weight: lighter;
            }
          }
          ul.dropdown-menu {
            min-width: unset;
          }
        }
      }

      .input__typevalue {
        min-width: 172px;
        max-width: 172px;
      }

      .input__limit {
        min-width: 114px;
        max-width: 114px;
        padding-left: 30px;
      }

      .product__add {
        font-size: 14px;
        font-weight: normal;
        color: #004f9c;
        border: 1px solid #004f9c;
        border-radius: 4px;
        padding: 10px 15px;
      }
    }
  }

  .page__product {
    .popup {
      min-width: 100%;
      overflow: hidden;
    }

    .product__radio {
      display: flex;
      align-items: center;
    }
  }

  .productdetail {
    &__container {
      width: 100%;
    }
    &__section {
      display: flex;
      justify-content: space-between;
      margin-bottom: 20px;
      &.product__limit {
        align-items: center;
      }
    }
    &__section:last-child {
      margin-bottom: 0px;
    }
    &__image {
      min-width: 65px;
      width: 65px;
      height: 65px;
      margin-right: 15px;
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center;
      background-color: #ddd;
    }
    &__detail {
      display: flex;
      justify-content: space-between;
      width: 100%;
      &--container {
        margin-right: 15px;
      }
      &--name {
        font-size: 14px;
        font-weight: normal;
      }
      &--price {
        display: flex;
        .price__original,
        .price__discount {
          font-size: 12px;
          font-weight: lighter;
        }
        .price__original {
          margin-right: 5px;
        }
        .price__discount {
          color: #f42020;
        }
      }
      .product__edit img {
        vertical-align: baseline;
        width: 14px;
        height: 14px;
      }
    }
    &__limit {
      align-items: center;
      justify-content: flex-end;
      &--title {
        font-size: 14px;
        font-weight: normal;
        margin-right: 10px;
      }
      &--input {
        max-width: 58px !important;
        min-width: 58px !important;
        font-size: 15px;
        font-weight: lighter;
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
      }
    }
  }

  .checkbox,
  .radio {
    margin-top: 15px;
    margin-bottom: 15px;
    label {
      padding-left: 30px;
    }
  }

  input[type="radio"] {
    height: 17px;
    width: 17px;
    border: 1px solid #ddd;
    margin-left: 0px;
    &:hover {
      background: unset;
    }
    &:checked {
      background: #004f9c;
      border-color: #fff;
      border: 3px solid;
      box-shadow: 0px 0px 0px 1px #ddd;
    }
  }

  input[type=date],
  input[type=time], 
  input[type=datetime-local], 
  input[type=month]{
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-weight: 100;
    padding: 3px 6px;
  }

  .popup__footer--submit,
  .popup__footer--cancel,
  button.save,
  button.cancel,
  button.next {
    font-size: 14px;
    font-weight: normal;
    padding: 8px 18px;
    border-radius: 3px;
    min-width: 75px;
  }
  button.cancel {
    background: #f0f0f0;
    border: unset;
    color: #000;
    margin-right: 5px;
  }
  button.save,
  button.next {
    background: #004f9c;
    border: unset;
    color: #fff;
  }
  .action__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .delete {
    color: #ff3535;
    font-weight: normal;
    font-size: 14px;
    text-decoration: underline;
  }
  .styled-checkbox + label:before {
    border-radius: 4px;
    border: 1px solid #e5e5e5;
  }
  .styled-checkbox + label {
    font-size: 14px;
    font-weight: lighter;
    margin-bottom: 0;
  }
  .styled-checkbox:checked + label:before {
    background: #004f9c;
  }
  .styled-checkbox:checked + label:after {
    background: #fff;
    box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white,
      4px -6px 0 white, 4px -8px 0 white;
  }

  .input__expired {
    width: 190px !important;
  }

  @media only screen and (max-width: 992px) {
    .modal-header,
    .modal-footer {
      padding: 20px;
    }
    .input__name {
      width: 100% !important;
    }

    .code__code--input {
      input {
        width: 100% !important;
      }
    }

    .maindetail__container {
      display: block !important;
    }

    .code {
      &__container {
        width: 100% !important;
        display: block !important;
      }
      &__code {
        min-width: 100% !important;
        max-width: 100% !important;
      }
      &__desc {
        width: 100% !important;
        margin-left: 0 !important;
        text-align: right;
      }
    }

    .limit__container {
      width: 100% !important;
    }
    .page__detail--container {
      display: block !important;
    }
    .result__container,
    .condition__container {
      width: 100% !important;
    }
    .condition__section,
      .result__section {
        min-height: unset !important;
      }
    .condition__section {
      border-right: 0px solid #e5e5e5 !important;
      border-bottom: 1px solid #e5e5e5 !important;
      padding-right: 40px !important;
    }
    .result__section {
      padding-left: 40px !important;
    }

    #condition_none {
      .condition__section--title {
        margin-bottom: 0;
      }
    }

    .page__condition--container {
      display: block !important;
    }

    .page__condition--result,
    .page__condition--condition {
      width: 100% !important;
    }

    .page__condition--condition {
      border-right: 0px solid #e5e5e5 !important;
      border-bottom: 1px solid #e5e5e5 !important;
    }
  }
}
