﻿.ui-dialog .ui-dialog-content.trade-dialog {
    line-height: 1em;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    font-size: 14px;
    ul li {
      line-height: 1em;
      margin: 0;
      padding: 2px;
    }
    .text-align-center { text-align: center; }
    .bold { font-weight: bold; }
    .text-vertical-align { line-height:2em; }
    .text-vertical-align span { vertical-align: bottom;}
    .no-wrap { white-space: nowrap; }
    .dotted-underline { border-bottom: 1px dotted #000; }
    .align-text {
      padding-left: 15px;
      padding-right: 2px;
      box-sizing: border-box;
    }
    .box-shadow { box-shadow: 5px 5px 8px rgba(0,0,0,0.25); }

    /* .trade-fields contains all the form fields */
    .trade-fields {
      position: relative;
      height: 100%;
      width: 100%;
    }
    /* .trae-conf comes from tradeConf.js module */
    .trade-conf {
        left:-400px;
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
    }
}
.rtl-direction .trade-dialog {
  .ui-selectmenu-text { text-align: right; }
  input { direction: ltr; }
}

.trade-fields {
  justify-content: center;
  .error { background: #fef1cf; }
  ul.categories-row li select.contract-category-display + .ui-selectmenu-button { max-width: 145px; }
  .ui-selectmenu-text { margin-top: -4px; }
  .duration-row li,
  .date-start-row li,
  .categories-row {
    justify-content: space-between;
    li {height: 28px; }
    li.sparkline-chart { min-width: 93px;}
    li.tick-quote span {
      background: #29ABE2;
      text-align: center;
      display: inline-block;
      min-width: 60px;
      border-radius: 5px;
      padding:3px;
      color: white;
      margin-top: 5px;
    }
    li.tick-quote span.down { background: #c03; }
  }

  .categories-row {
    .ui-icon-help {
      min-width: 28px;
      height: 28px;
      color: #2a3052;
      position:absolute;
      z-index: +1;
      &:hover {
        opacity: 0.8;
        cursor: help;
      }
    }
    .ui-selectmenu-button .ui-selectmenu-text {
      width: 70px;
      padding-left: 2em;
      text-align: center;
    }
  }

  .trade-template-manager {
    z-index: +1;
    display: relative;
    .img {
      display: inline-block;
      width: 20px;
      height: 20px;
      padding: 5px;
      border-radius: 5px;
      margin-left: 1px;

      span {
        display: block;
        width: 100%;
        height: 100%;
        &:hover {
          cursor: pointer;
          opacity: 0.75;
        }
      }
    }
    .trade-template-manager-root {
        position: absolute;
        margin: -2px 0 0 -2px;
        font-size: 12px;
        width: 185px;
        background: white;
        max-height: 310px;
        overflow-y: auto;
        overflow-x: hidden;
        border: solid gray 1px;
        box-sizing: border-box;
        z-index: 1;
        input[type='file'] {
          display: none;
        }
        .menu {
            a {
                margin: 5px;
                display: block;
                width: 95%;
                
                span {
                  display: block;
                }
            }
        }
        .back-arrow > * {
          cursor: pointer;
          display: inline-block;
          vertical-align: middle;
          text-decoration: none;
        }
        .errors {
          height: 1em;
          .error {
            color: red;
            background: white;
          }
        }
        .save-as, .rename, .confirm {
            padding: 5px;

            .title { margin: 5px 0; }
            button { margin-top: 5px;}
            .button {
                width: 100%;
                text-align: center;
                button { margin-right: 5px; }
            }
            input {
              background: white;
              outline: 0;
              border: solid 1px gray;
              color: black;
              height: 26px;
              margin-bottom: 5px;
              width: 100%;
              box-sizing: border-box;
            }
        }
        .templates {
            padding: 5px;
            & > div > div {
                margin: 5px 0;
            }

            .template {
              display: inline-block;
              font-weight: normal;
              &:not(:last-child){
                  border-bottom: 1px solid #dedede;
              }
              word-wrap: break-word;
              a.options {
                  margin-right: 5px;
              }
              .name {
                transition: color 0.2s;
                cursor: pointer;
                margin-bottom: 3px;
                &.active {
                    font-weight: bold;
                    color: #e98024
                }
                &:hover {
                    color: #e98024;
                }
              }
            }
        }
        .button-disabled {
          pointer-events: none;
        }
    }
  }

  /* data-balloon styling */ 
  .barriers-high-barrier-row, .barriers-low-barrier-row, .barriers-barrier-row{
    li:first-of-type span:before {
      transform: translate(-20%,0);
    }
    li:last-of-type span:before {
      transform: translate(-90%,0);
    }
  }
}
.ui-dialog li div.ui-menu-item-wrapper {
    padding: 0px 1em 0px .4em;
    margin: 3px 0px;
}
/* style elments in the drop down*/
.trade-dialog-date-start-ul li .ui-menu-item-wrapper{
    padding: 0;
    font-size:13px;
    text-align:center;
}
/* this will be added to jquery ui widget which is outside of the .trade-fields container */
.trade-dialog-date-start-ul {
    height: 250px;
}
/* this will be added to jquery ui widget which is outside of the .trade-fields container */
.trade-dialog-digits-select-ul li {
    overflow:hidden;
    font-size:13px;
    text-align:center;
    margin-top: 0px;
    padding:0;
}

/*#endregion*/

.trade-fields ul {
    transition: padding-top 0.5s ease;
    list-style:none;
    margin: 0;
    padding: 2px 3px 2px 3px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: inherit;
}

.trade-fields ul li:nth-child(1) > span {
  line-height: 28px;
  display: inline-block;
  white-space: nowrap;
}
.trade-fields ul.digits-row li:nth-child(1) > span {
  min-width: 140px;
  display: inline-block;
  padding-right: 5px;
}
.trade-fields ul li:nth-child(3) > span {
  min-width: 100px; 
  display: inline-block;
  box-sizing: border-box;
  line-height: 28px;
}
.trade-fields ul.date-start-row li:nth-child(3) > span { min-width: 85px }

.trade-fields ul li:nth-child(1) select + .ui-selectmenu-button { 
  max-width: 130px ;
  height: 26px;
  border-radius:3px;
  padding: 0;
}
.trade-fields ul li:nth-child(2) select + .ui-selectmenu-button { 
  width: 100px; 
  height: 26px;
  border-radius:3px;
  padding: 0;
  .ui-selectmenu-text {
    margin-top: 2px;
  }
}
.trade-fields ul li:nth-child(3) select + .ui-selectmenu-button { 
  width: 100px; 
  height: 28px;
  padding: 0;
  border-radius:3px;
}

.trade-fields ul li select + .ui-selectmenu-button { height: 28px;}

.trade-fields ul li span.ui-spinner { border: 0; }
.trade-fields ul li input {
  margin: 0;
  height: 28px;
  padding-left: 5px;
}
.trade-fields ul li:nth-child(2) input { width: 100px;}
.trade-fields ul li:nth-child(3) input { width: 85px; }

.trade-fields ul li:nth-child(2n) input:not([step]),
.trade-fields ul li:nth-child(2n+3) input:not([step]) {
  width: 100px;
}

.trade-fields ul li select.date-start-select + .chosen-container {
  width: 167px !important;
  .chosen-search { display: none; }
  ul.chosen-results {
    flex-direction: column;
    max-height: 250px;
    margin: 0px;
    padding: 0px;
    li {
      width: 100%;
      text-align: center;
      display: block;
      height: 100%;
      padding: 5px 0;
      line-height: 18px;
    }
  }

  .chosen-drop {
      box-shadow: none;
      border-radius: 2px;
      border-top-right-radius: 0;
      border-top-left-radius: 0;
      border: 1px solid #F2F2F2;
      border-top: none;
  }

  .chosen-single {
    border: 1px solid #F2F2F2;
    background-image: none;
    border-radius: 2px;
    font-weight: normal;
    height: 100%;
    padding: 1px 2px;
    text-align: center;
    position: relative;
    box-shadow: none;
  }

  &.chosen-container-active {
    .chosen-single {
      box-shadow: none;
      border: 1px solid #F2F2F2;
      padding: 0;
      > div {
        position: absolute;
        right: 0;
      }
    }
  }
  .chosen-disable {
    z-index: unset;
  }
}

/*#region ul.contract-displays */
    .trade-fields ul.contract-displays {
        overflow: hidden;
        justify-content: center;
        padding: 9px 0;
        margin-bottom: 2px;
    }

    .trade-fields ul.contract-displays li {
        opacity: .5;
        cursor: pointer;
        padding: 0 5px;
    }

    .trade-fields ul.contract-displays li.active {
        opacity: 1;
        font-weight: bold;
    }

    .trade-fields ul.contract-displays li:before {
        content: " | ";
        opacity: .5;
        font-weight:normal;
    }
    .trade-fields ul.contract-displays li:first-child:before { content: none; }
/*#endregion*/

.trade-fields ul li input.date-expiry-date { width: 100px; }
.trade-fields ul li input.date-expiry-hour { width: 100px; }

.trade-fields .spread-deposit {
    background: #c2c1c1;
    white-space: nowrap;
    font-size: 85%;
}

.trade-fields ul li select.digits-select + .ui-selectmenu-button { width: 40px; }
.trade-fields ul li select.digits-select + .ui-selectmenu-button .ui-icon { right: 3px;}
.trade-fields ul li select.digits-select + .ui-selectmenu-button .ui-selectmenu-text { padding-left: 10px; text-overflow: clip;}

.trade-fields {
  display: flex;
  flex-direction: column;

  .proposal-message {
    margin-top: auto;
    border-top: 1px solid #c2c1c1;
    text-align: center;
    li {
        padding: 0 5px;
        line-height: 1.1em;
    }
  }

  .message-row-wrapper {
    justify-content: center;
    padding: 2px 0;
    font-size: 12px;
    &__container {
      text-align: center;
      span {
        display: inline;
      }
    }
  }

  .purchase-row-wrapper {
    display: flex;
    justify-content: space-between !important;
    padding: 4px 0 !important;
    font-weight: bold;
    font-size: 18px;

    &__btn-container {
      margin-right: auto !important;
      padding-left: 10px !important;
    }
    &__text-container {
      display: flex;
      align-items: center;
      margin-left: auto !important;
    }
  }
}

.future-timepicker-wrapper {
  display: flex;
  align-items: center;
  p {
    margin: 0;
    padding-left: 5px;
  }
  input {
    padding-left: 8px;
  }
}
