@import 'variables';
@import 'mixins';
#page-content.users-edit,
#page-content.users-update,
#page-content.users-confirm_destroy,
#page-content.organizations-create,
#page-content.organizations-update {
  font-family: $helvetica;
  #notice {
    background: $green;
    color: black;
    padding: 40px 0px 40px;
    text-align: center;
    position: relative;
    top: 60px;
    left: 0px;
    right: 0px;
    &.error-notice {
      background: rgba(255, 80, 80, 0.7);
      color: white;
    }
  }
  .user-settings-page {
    padding-top: 10px;
    width: 900px;
    max-width: 94%;
    margin: 40px auto;
    font-size: 15px;
    .finish-notice {
      background: rgb(102, 93, 162);
      max-width: 95%;
      padding: 25px 0px;
      text-align: center;
      margin: 0px 0px 25px;
      color: white;
      font-weight: bold;
      border-radius: 2px;
      .small {
        font-size: 13px;
        font-weight: 300;
        padding: 15px 5px 5px;
        line-height: 19px;
      }
    }
    .field-notice {
      background: white;
      max-width: 95%;
      padding: 25px 0px;
      text-align: center;
      margin: 0px 0px 25px;
      color: $black;
      font-weight: bold;
      border-radius: 2px;
      border: 1px solid $light-medium-gray;
      box-shadow: $shadow;
      .small {
        font-size: 13px;
        font-weight: 300;
        padding: 15px 5px 5px;
        line-height: 19px;
      }
    }
    .settings-hub {
      border-radius: 3px;
      list-style: none;
      font-size: 20px;
      font-family: $helvetica-condensed;
      font-stretch: condensed;
      margin: 0px 0px;
      line-height: 33px;
      padding-left: 4px;
      width: 97%;
      margin-bottom: 15px;
      @media screen and (min-width: 514px) {
        width: 90%;
        margin: 0px auto;
      }
      @media screen and (min-width: 835px) {
        float: left;
        width: 250px;
      }
      .single-settings-tab {
        padding-left: 5px;
        width: 100%;
        display: inline-block;
        @include themeable(color, theme-color, $black);
        &.selected {
          @include themeable(
            background,
            theme-container-accent-background,
            $purple
          );
        }
        @media screen and (min-width: 514px) {
          width: 210px;
        }
      }
    }
    .settings-form {
      margin: 0px auto 50px;
      width: 94%;
      max-width: 700px;
      float: left;
      h2 {
        font-size: 2.5em;
      }
      @media screen and (min-width: 835px) {
        width: 66%;
      }
    }
    #error_explanation {
      max-width: calc(95% - 18px);
      margin-bottom: 25px;
    }
    .big-button {
      display: inline-block;
      width: 561px;
      max-width: calc(100% - 18px);
      padding: 10px 0px;
      padding-left: 10px;
      border-radius: 3px;
      font-size: 1.2em;
      img {
        vertical-align: -3px;
        height: 1.2em;
        width: 1.2em;
      }
    }
    label {
      display: inline-block;
      vertical-align: top;
      padding: 14px 0px 8px;
    }
    .field {
      input[type='checkbox'] {
        margin-top: 15px;
        display: inline;
        width: 100px;
      }
      select {
        margin-top: 15px;
      }
      &.checkbox-label-first {
        label {
          width: auto;
        }
      }
      .field-notice {
        text-align: right;
        .field-notice-inner {
          width: 550px;
          max-width: calc(100% - 2vw);
          background: $red;
          color: white;
          padding: 1vw;
          border-radius: 5px;
          display: inline-block;
          text-align: center;
          margin-right: 10px;
          line-height: 1.5em;
          margin-top: 10px;
          a {
            color: white;
            text-decoration: underline;
          }
        }
      }
    }
    .settings-color-select-container{
      display: flex;
      align-items: center;
      width:100%;
      .color-select-fields{
        width:50%;
        .select-field-wrapper{
          display: flex;
          width:100%;
          .color-select-textbox{
            flex:1;
            min-width:70px;
            border-radius: 0px;
            border-top-left-radius: 3px;
            border-bottom-left-radius: 3px;
          }
          input[type="color"] {
            box-sizing:border-box;
            border-radius: 0px;
            border-top-right-radius: 3px;
            border-bottom-right-radius: 3px;
            padding:3px;
            width:50px;
            height:48px;
            margin-left: -1px;
            border: 1px solid rgb(222, 230, 233);
            cursor:pointer;
          }
        }
      }
      .color-select-preview{
        flex:1;
        text-align:center;
        #color-select-preview-logo{
          padding:25px 20px;
          border-radius:7px;
          margin-top:20px;
          display:none; /* Changes to inline-block when javascript loads preview */
        }
      }
      
    }
    .checkbox-field {
      display: flex;
      flex-direction: column;
      padding: 10px 0px 20px;
      max-width: 750px;
      font-size: 17px;
      .sub-field {
        display: inline-block;
      }
      label {
        width: auto;
        display: inline;
        padding: 0px;
      }
      input {
        display: inline;
        width: 30px;
      }
      .field-explainer {
        opacity: 0.7;
        margin: 8px auto;
        width: 87%;
        font-size: 0.9em;
      }
    }
    .field_with_errors {
      display: inline-block;
      vertical-align: top;
      max-width: 100%;
      input {
        border: 2px solid rgb(237, 65, 65);
        background: rgb(252, 241, 243);
      }
    }
    form {
      input {
        width: 650px;
        max-width: calc(100% - 30px);
        padding: 12px;
        font-size: 19px;
        border: 1px solid rgb(222, 230, 233);
        border-radius: 3px;
        &[type='file'] {
          border: 0px;
        }
        &[type='submit'] {
          width: 255px;
          max-width: 100%;
          padding: 14px 0px;
          margin-top: 20px;
          font-size: 1.5em;
          cursor: pointer;
          &.danger-button {
            background: $red;
          }
          &:hover {
            opacity: 0.88;
          }
        }
      }
      select {
        display: block;
        font-size: 19px;
        width: 650px;
        max-width: calc(100% - 4px);
        padding: 12px;
        border: 1px solid rgb(222, 230, 233);
        border-radius: 3px;
        background-color: white;
      }
      button.big-action {
        width: 130px;
        padding: 3px 0px;
        font-size: 1.2em;
        font-weight: bold;
        border-radius: 3px;
        border: 0;
        &:hover {
          opacity: 0.88;
        }
        cursor: pointer;
        &.danger-button {
          background-color: #b30000;
          color: $off-white;
        }
        &:disabled {
          background-color: $light-medium-gray;
          &:hover {
            opacity: 1;
            cursor: not-allowed;
          }
        }
        img {
          vertical-align: -3px;
          height: 1.2em;
          width: 1.2em;
        }
      }
      .image-present {
        @media screen and (max-width: 700px) {
          display: block;
        }
        img {
          height: 48px;
          width: 48px;
          border-radius: 70px;
          &.nav-image-version {
            height: auto;
            border-radius: 0px;
          }
        }
        input {
          width: 497px;
          max-width: calc(100% - 84px);
          vertical-align: top;
        }
      }
      textarea {
        border: 1px solid rgb(222, 230, 233);
        width: 550px;
        max-width: calc(100% - 30px);
        padding: 12px;
        border-radius: 3px;
        height: 120px;
        font-size: 16px;
        resize: none;
      }
    }
    h2 {
      font-size: calc(40px + 1vw);
      font-family: $helvetica-condensed;
      font-stretch: condensed;
      a {
        color: $black;
        background: $yellow;
      }
      .organization-dropdown {
        position: relative;
        display: inline-block;
        color: $black;
        background: $yellow;
      }
      select {
        color: inherit;
        background: inherit;
        vertical-align: baseline;
        font-size: inherit;
        font-family: inherit;
        font-stretch: inherit;
        border: 0;
        margin: 0;
        padding-right: 1.25em;
        text-indent: 0.01px;
        -moz-appearance: none;
        -webkit-appearance: none;
        text-overflow: '';
      }
      .organization-dropdown::before,
      .organization-dropdown::after {
        content: "";
        position: absolute;
        pointer-events: none;
      }
      .organization-dropdown::after { /*  Custom dropdown arrow */
        content: "\25BC";
        height: 1em;
        font-size: 0.625em;
        line-height: 1;
        right: 0.25em;
        top: 50%;
        margin-top: -.5em;
      }
      .organization-dropdown::before { /*  Custom dropdown arrow cover */
        width: 1em;
        right: 0;
        top: 0;
        bottom: 0;
      }
    }
    .secret-field {
      margin: 30px 0px;
    }
    hr {
      opacity: 0.3;
      margin-top: 20px;
      width: 70%;
    }
    .single-app-integration {
      @include themeable(background, theme-container-background, #fff);
      @include themeable(border, theme-border, 1px solid $light-medium-gray);
      border-radius: 8px;
      padding: 10px;
      h2 {
        margin: 0;
        padding: 0;
        font-size: 1.5em;
      }
      sup {
        @include themeable(color, theme-secondary-color, $medium-gray);
      }
      img {
        height: 1.0em;
        margin-left: 5px;
      }
    }
  }
  .default-billing-message {
    margin: 10px 0px;
  }
  .stripe-button-wrapper {
    height: 40px;
  }
  .credit-card-button {
    background: lighten($blue, 3%);
    color: white;
    padding: 12px 25px;
    border: 1px solid darken($blue, 8%);
    border-radius: 3px;
    cursor: pointer;
    font-size: 1.3em;
    box-shadow: inset 0 -5px 5px darken($blue, 2%);
    &:hover {
      opacity: 0.95;
    }
    .remove-card {
      background: lighten($red, 3%);
    }
  }
  .billing-history-header {
    margin-top: 35px;
    font-size: 2em;
    border-bottom: 5px solid $black;
    padding: 5px;
    width: 270px;
  }
  .billing-item {
    padding: 10px 5px;
    border-bottom: 1px solid $light-medium-gray;
    margin-top: 5px;
    font-size: 1.3em;
    &:hover {
      background: $light-gray;
    }
    .billing-item-detail {
      display: inline-block;
      color: $medium-gray;
      font-size: 0.8em;
      margin-top: 6px;
      margin-right: 6px;
      background: $light-gray;
      padding: 3px 8px;
      border-radius: 8px;
      border: 1px solid $light-medium-gray;
      &.billing-item-green {
        color: $green;
      }
      &.billing-item-blue {
        color: $blue;
      }
      &.billing-item-red {
        color: $red;
      }
    }
    form {
      display: inline-block;
      button {
        cursor: pointer;
        &:hover {
          color: $blue;
          border: 1px solid $blue;
        }
      }
    }
  }
}

.settings-hr {
  opacity: 0.3;
  width: 570px;
  max-width: 98%;
  margin: 0;
}

.github-repos {
  max-height: 400px;
  overflow-y: auto;
  @include themeable(background, theme-container-background, #fff);
  box-shadow: $shadow;
  &.loading-repos {
    height: 400px;
    background: white url(image_path('loading-ellipsis.svg')) no-repeat center
      center;
    background-size: 50px;
  }
  &.github-repos-errored {
    height: 400px;
  }
  .github-repo-row {
    @include themeable(background, theme-container-background, #fff);
    padding: 12px;
    margin: 5px 0px;
    transition: all 0.6s ease;
    &:hover {
      color: #0f0f0f;
      background: $light-green;
      button {
        background: #a8f1e9;
      }
    }
    &.github-repo-row-selected {
      background: $light-green;
      color: #0f0f0f;
    }
    .github-repo-row-name {
      font-weight: bold;
      button {
        transition: all 0.6s ease;
        cursor: pointer;
        font-size: 1.2em;
        font-weight: bold;
        width: 130px;
        background: white;
        border: 0px solid;
        border-radius: 3px;
        padding: 3px 0px;
        margin-top: -5px;
        float: right;
        min-height: 28.5px;
        &:hover,
        &:focus {
          background: $green;
        }
        &:disabled {
          cursor: wait;
          background: white url(image_path('loading-ellipsis.svg')) no-repeat
            center center;
          background-size: 75px;
        }
      }
    }
    .github-repo-fork {
      margin-left: 5px;
      font-weight: 400;
      background: $purple;
      color: $bold-blue;
      border-radius: 3px;
      padding: 1px 6px;
      font-size: 0.9em;
    }
    .github-repo-featured-indicator {
      display: inline-block;
      float: right;
      background: $green;
      color: white;
      border: 0px;
    }
  }
}

.settings-org-members {
  margin-bottom: 50px;
  width: 550px;
  max-width: 92%;
  h3 {
    margin-bottom: 18px;
  }
  .settings-org-member-row {
    padding: 10px;
    font-size: 20px;
    position: relative;
    width: 100%;
    background: $light-gray;
    margin: 3px 0px;
    border-left: 5px solid darken($light-gray, 5%);
    &.settings-org-admin-row {
      border-left: 5px solid $green;
      background: $light-green;
    }
    .settings-org-member-actions {
      margin-top: 5px;
    }
    form {
      display: inline-block;
    }
    .settings-org-member {
      background: $green;
      color: white;
      padding: 3px 8px;
      border-radius: 3px;
      font-size: 0.7em;
      border: 0px;
      cursor: pointer;
      &.settings-org-member-admin-self {
        cursor: default;
        background: $medium-gray;
      }
      &.settings-org-member-admin-other {
        background: $green;
        cursor: default;
      }
      &.settings-org-member-make-admin {
        color: $green;
        background: $light-green;
        border: 1px solid $green;
      }
      &.settings-org-member-remove {
        color: $red;
        background: lighten($red, 36%);
        border: 1px solid $red;
      }
    }
  }
  h5 {
    color: $medium-gray;
    font-size: 0.9em;
    margin-top: -18px;
    margin-bottom: 10px;
  }
  .settings-org-secret {
    overflow-x: scroll;
    padding: 7px;
    border: 1px dashed $medium-gray;
    width: 100%;
    border-radius: 3px;
    font-size: 1.1em;
    cursor: pointer;
  }
  .settings-generate-new-secret {
    margin-top: 10px;
    background: $black;
    color: white;
    border: 0px;
    padding: 4px 14px;
    border-radius: 3px;
    font-size: 15px;
    cursor: pointer;
    &:hover {
      background: lighten($black, 14%);
    }
  }
  clipboard-copy {
    cursor: pointer;
    display: flex;
    img {
      max-width: 26px;
      margin-left: 8px;
    }

  }
  .copy-text-announcer {
    display: block;
    text-align: center;
    padding-top: 10px;
    &[hidden] {
      display: none;
    }
  }
}

.signout_confirm-wrapper {
  padding: calc(15% + 50px) 2% 30%;
  text-align: center;
}

.org-widget-preview .primary-sticky-nav {
  margin-top: 10px;
  position: initial;
  font-size: 1.2em;
}

ul.delete__account {
  li {
    padding-bottom: 5px;
  }
}

.api__secret {
  &__container {
    background-color: $off-white;
    height: 6.5rem;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-radius: 3px;
    border: 1px solid $light-medium-gray;
    @media screen and (min-width: 600px) {
      height: 5rem;
    }
  }

  &__desc {
    width: 70%;
    float: left;

    .title {
      font-weight: bold;
      margin: 0;
      padding-bottom: 0.25rem;
    }
    .content {
      margin: 0;
      color: $medium-gray;
      font-weight: bold;
      font-family: $monospace;
      padding: 5px 8px;
      border: 1px dashed $black;
      overflow: hidden;
      margin: 3px 0px;
    }
    .subtitle {
      margin: 0;
      color: $dark-medium-gray;
    }
  }

  &__revoke {
    text-align: right;
    margin: 1.6rem auto 0;
    display: block;
    @media screen and (min-width: 600px) {
      float: left;
      width: 30%;
    }
  }
}

.membership-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-flow: row wrap;
  @include themeable(background, theme-container-accent-background, $off-white);
  border-radius: 5px;
  border: 1px solid $light-medium-gray;
  padding: 0.5rem 0 0.8rem 0.5rem;

  dt, label {
    flex-basis: 40%;
    font-size: 1.1rem;
    font-weight: bold;

    margin-top: 0.3rem;
    padding: 0.2rem;
  }

  dd {
    flex-basis: 40%;
    flex-grow: 1;

    margin-top: 0.3rem;
    padding: 0.2rem;

    .no {
      color: darken($red, 10%);
    }
  }
}

.membership-purchase-link {
  font-size: 2rem;
}
