@import '../../core/Variables';

.hc-dialog {
    .modal-body {
      height: 450px;
    }

    .toggles {
      display: flex;
      border-bottom: 1px solid #333;
      font-size: 18px;
      height: 40px;
      line-height: 40px;
    }

    .toggle {
      flex-basis: 0;
      flex-grow: 1;
      flex-shrink: 1;
      text-align: center;
      background: #eee;
      cursor: pointer;
      white-space: nowrap;
      padding: 0 3%;
    }
}

.toggle + .toggle {
  margin-left: 5px;
}

.toggle.selected {
  background: #333;
  color: white;
}

.modal-tab {
  display: none;

  &.selected {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
}

.hc-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;

    &.header-container {
        font-size: 18px;
        margin-bottom: 20px;
        flex: 0 0 auto;
    }

    &.content {
        overflow-y: auto;
    }

    &.split {
        padding: 20px 0;
        align-items: center;

        &:nth-child(n+2) {
            border-top: 1px solid #EEE;
        }
    }

    .tooltip {
      &.in {
        opacity: 1;
      }

      .tooltip-inner {
        box-shadow: 0 0 2px 0 white;
      }
    }
}

ul.hc-container {
    padding-left: 0;
    list-style-type: none;
}

.hc-row {
    display: flex;
    flex: 0 0 auto;
    align-items: center;

    &.item-title {
        color: #777;
        margin-bottom: 2px;
    }
}

.hc-container.content .hc-row:nth-child(n+2) {
    margin-top: 10px;
}

.hc-column {
     display: flex;
     flex: 1 1 auto;

     &.first {
         margin-right: 30px;
     }

     &.last {
         flex: 0 0 190px;
     }
}

.hc-check-label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    flex: 1 0 auto;
}

.hc-check-label-text {
    flex: 1 1 auto;
    width: 0;
    font-weight: normal;
    cursor: pointer;

    &.truncated {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
}

.hc-row.disabled .hc-check-label-text {
    color: #AAA;
}

input.hc-checkbox {
  cursor: pointer;
  margin: 0 8px 0 0;

  &.space {
      margin: 0 15px 0 0;
  }
}

.hc-text-input {
    flex: 1 0 auto;
    padding: 2px 8px;

    &[disabled] {
      color: #AAA;
    }

    &.truncated {
        flex: 0 0 auto;
    }
}


/* LOGO AND SHARING STYLES */

.hc-item {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 55%;

    &:nth-child(n+2) {
        margin-top: 20px;
    }
}

.hc-item-container {
    border: 1px solid #EEE;
    display: flex;
    flex: 1 0 auto;
    height: 62px;
    padding: 10px;
    position: relative;
    align-items: center;
    justify-content: center;
}

.hc-logo {
    flex: 0 1 auto;
    align-self: center;
    max-height: 42px;
    max-width: 210px;
}

.hc-action-icon-underlay {
  background: black;
  position: absolute;
  z-index: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: space-between;
}

.hc-action-icon {
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    opacity: 0.9;

    &:hover {
      opacity: 1;
    }
}

.hc-logo-button.hidden, .hc-logo.hidden, .hc-action-icon.hidden {
   display: none;
}

.hc-intro {
  font-size: 90%;
  margin-bottom: 20px;
}

.hc-logo-upload-msg {
  display: none;
  margin-top: 5px;
  padding: 5px 10px;
  flex: 1 0 auto;

  &.alert-success,
  &.alert-warning,
  &.alert-danger {
    display: block;
  }
}

.org-logo-row {
  .hc-check-label {
    flex: 0 1 auto;
  }

  .org-logo-checkbox {
    flex: 1 0 auto;
  }

  .hc-check-label-text {
    width: auto;
    display: inline-block;
    line-height: 1.4;
  }

  .org-logo-tooltip {
    flex: 0 0 auto;
    margin-left: 8px;
  }
}

.display-block {
  display: block;
}

.color-sample, .font-sample {
  width: 100%;
  border: 1px solid @gray-lighter;
  position: relative;
}

.color-sample {
  padding: 16px 22px;

  .text-block {
    height: 2px;
    margin-bottom: 2px;
  }

  .width-1 {
    width: 40px;
  }

  .width-2 {
    width: 46px;
  }
}

.font-sample {
  padding: 15px;

  .title-sample {
    font-size: 1.5em;
    margin-bottom: 8px;
  }

  .body-sample {
    line-height: 1.2em;
    text-align: left;
  }
}

.hc-container .config-item {

  justify-content: flex-start !important;

  .config-background {
    margin-bottom: 1em;
  }

  &:hover .config-background {
      box-shadow: 0 0 2px 1px @gray-lighter;
  }

  .fa-check {
    position: absolute;
    font-size: 1.5em;
    right: -0.5em;
    top: -0.5em;
    color: @brand-primary;
    text-shadow: -1px 0px 2px rgba(255, 255, 255, 1);
    display: none;
  }

  &.selected .fa-check {
    display: block;
  }
}

.hc-container .color-list, .hc-container .font-list {
  width: 100%;
}

.hc-container .color-list {
  li {
    width: 30%;
  }
  .config-background {
    width: 90px;
  }
}

.hc-container .font-list {
  & > li {
    width: 45%;
    justify-content: flex-start !important;
  }

  .dropdown,
  .dropdown-toggle {
    width: 100%;

    .fa {
      margin-left: 5px;
    }
  }

  .dropdown-menu {
    font-size: 14px;

    li > a {
      padding: 5px 20px !important;
    }
  }

  .config-background {
    width: 100%;
  }
}

.appearance-tab {
  padding: 0;
  flex-direction: row;

  .item-title,
  .item-subtitle {
    // combat flex positioning
    width: 100%;
    text-align: left;
  }

  .item-title {
    font-size: 1.5em;
    margin-bottom: 0.5em;
  }

  .item-subtitle {
    line-height: 1.3em;
    cursor: default;
    margin-bottom: 0.5em;
  }
}

.appearance-options {
  width: 60%;
  border-right: 1px solid #eee;
  padding: 0 2% 0 0;
  display: flex;
  flex-direction: column;
}

.appearance-preview {
  width: 35%;
  margin-left: 3%;
  margin-top: 10%;
}


/*
* Responsive
*/


@media (max-height: 710px) {
    .hc-dialog {
      margin-top: 20px;
      margin-bottom: 0;

      .modal-body {
        height: 400px;

        .hc-container.split {
          padding: 10px 0;
        }
      }
    }
}
