/* Admin CSS*/

//@tailwind preflight;
// @tailwind components;

// @tailwind utilities;

.transition {
  transition: all 0.3s ease;
}
.transition-slow {
  transition: all 1s ease;
}
.transition-normal-in-out-quad {
  transition: all 2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.transition-slow-in-out-quad {
  transition: all 2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.spinner.ph-spinner {
  visibility: visible;
  left: 0;
  top: 0;
  display: block;
  float: none;
  margin: auto;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}

@import "project-huddle-select2-admin";
@import "admin/versions";
@import "global/spinners";

/* WordPress Changes */
.post-type-ph-project #minor-publishing-actions {
  display: none;
}

.ph-field::after {
  content: "";
  display: table;
  clear: both;
}

.ph-hidden {
  display: none;
}

/* Remove Outline */
a:focus,
a:active {
  outline: none;
  box-shadow: none;
}

#side-sortables .ph_meta_box {
  .ph-field {
    width: 100%;

    &.checkbox {
      padding: 10px 0;
      display: flex;

      input[type="checkbox"] {
        margin: 2px 10px 0 0;
      }
    }
  }
}

/* Meta Box Style */
.ph_meta_box {
  .form-field {
    &:after {
      content: "";
      display: table;
      clear: both;
    }
    padding-bottom: 20px;
    margin-bottom: 20px;
    &:not(:last-of-type) {
      border-bottom: 1px solid #eee;
    }
  }

  label {
    color: #555;
    width: 150px;
    float: left;
  }
  .ph-field {
    float: left;

    label {
      display: inline-block;
      vertical-align: middle;
      width: auto;
      float: none;
      margin-bottom: 0;
    }

    select {
      width: 100%;
    }

    &.radio label:not(:last-of-type) {
      display: block;
      margin-bottom: 10px;
    }
  }

  p.form-field:last-of-type {
    padding-bottom: 0;
  }
  #side-sortables & {
    p.form-field:last-of-type {
      margin-bottom: 0;
    }
  }
}

/* Tabs */
#ph-project-tabs.postbox {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 3px 8px;

  .hndle,
  .inside {
    padding: 0 !important;
  }
  .hndle,
  .handlediv {
    display: none;
  }
}

#poststuff h2.nav-tab-wrapper {
  padding: 0;
}

/* Project Emails */
#ph-project-emails {
  .checkbox_multi img {
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
    margin-right: 5px;
    border-radius: 100px;
  }

  .ph_meta_box .checkbox_multi label {
    margin-bottom: 10px;
    white-space: nowrap;
  }
}

/* Backbone Modal */
.ph-modal-no-overflow,
.ph-dialog-no-overflow {
  overflow: hidden;
  height: 100%;
}

#backbone_modal_dialog {
  .backbone_modal {
    top: 30px;
    left: 0;
    right: 0;
    bottom: 30px;
  }
  .backbone_modal-content {
    max-width: 700px;
  }
}

.backbone_modal {
  position: fixed;
  top: 30px;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 100101;
  font-size: 12px;
  height: 100%;
  overflow: auto;

  .ph-image-wrapper {
    background-size: cover;
  }

  .ui-buttonset {
    .ui-button {
      border-radius: 0;
      box-shadow: none;
      height: auto;
    }
    .ui-state-default {
      color: #777;
    }
    .ui-button-text-only .ui-button-text {
      padding: 0.7em 1.3em;
      -webkit-user-select: none; /* Chrome all / Safari all */
      -moz-user-select: none; /* Firefox all */
      -ms-user-select: none; /* IE 10+ */
      user-select: none; /* Likely future */
    }
    .ui-button.ui-corner-right {
      border-bottom-right-radius: 3px;
      border-top-right-radius: 3px;
    }
    .ui-button.ui-corner-left {
      border-bottom-left-radius: 3px;
      border-top-left-radius: 3px;
    }
    .ui-button.ui-state-active {
      background: #0091cd;
      border-color: #0073aa;
      -webkit-box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.6);
      box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.6);
      color: #fff;
    }
  }

  .backbone_modal-close .media-modal-icon:before {
    color: #777;
  }

  .media-modal-close {
    top: 0;
    right: 0;
    text-decoration: none;
    text-align: center;
  }

  .backbone_modal-content {
    position: relative;
    margin: auto;
    background: #fff;
  }
}

.backbone_modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 360px;
  background: #000;
  opacity: 0.7;
  z-index: 100100;
}

.backbone_modal-main {
  z-index: 200;
  padding: 60px;
}

.backbone_modal-main article,
.backbone_modal-main header {
  display: block;
  position: relative;
}

.backbone_modal-main header {
  position: absolute;
  bottom: 0;
}

.backbone_modal-main {
  h1 {
    font-size: 22px;
    font-weight: 400;
    line-height: 28px;
    border-bottom: 1px solid #dcdcdc;
    padding-bottom: 25px;
    margin: 0;
  }

  h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
  }

  p {
    margin: 0 0 5px 0;
  }

  .ph-setting {
    padding-top: 40px;
    &:after {
      content: "";
      display: table;
      clear: both;
    }
    .ph-setting-title {
      float: left;
    }
    .ph-setting-input {
      float: right;
    }
  }
}

.backbone_modal-main footer {
  height: 30px;
  z-index: 100;
  padding: 35px 0 0 0;
  background: #fff;
}

footer {
  .text-right {
    text-align: right;
    float: right;
    line-height: 28px;
  }
  .text-left {
    text-align: left;
    float: left;
    line-height: 28px;
  }

  .ph-delete {
    color: #adadad;
    text-decoration: none;

    .ph-icon,
    .ph-tooltip {
      display: inline-block;
      vertical-align: middle;
    }

    .ph-icon {
      text-align: center;
      font-size: 18px;
      font-weight: bold;
      transition-property: color;
      transition-duration: 0.5s;
      transition-timing-function: ease;
    }

    .ph-tooltip {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 2px;
      margin-left: 5px;
      opacity: 0;
      transform: translateX(-20px);
      transition-property: opacity, transform, color;
      transition-duration: 0.5s;
      transition-timing-function: ease;
    }

    &:hover {
      color: #a00;

      .ph-tooltip {
        transform: translateX(0);
        opacity: 1;
      }
    }

    &:active,
    &:focus {
      outline: none !important;
      box-shadow: none;
    }
  }
}

.ir {
  background-color: transparent;
  border: 0;
  overflow: hidden;
  /* IE 6/7 fallback */
  *text-indent: -9999px;
}

.ir:before {
  content: "";
  display: block;
  width: 0;
  height: 150%;
}

#post-visibility-display {
  text-transform: capitalize;
}

.ph-project {
  .ph-icon.ph-approval-indicator {
    color: #7bae54;
    vertical-align: middle;
    margin-right: 5px;
  }
}

span.approval-badge {
  color: #6f7c8a;
  padding: 4px 8px;
  background: #d8e0e6;
  border-radius: 3px;

  &.approved {
    color: #7bae54;
    background: #e0f7ce;
  }
}

/**
 * Tooltip Styles
 */

/* Add this attribute to the element that needs a tooltip */
[data-tooltip] {
  position: relative;
  z-index: 2;
  cursor: pointer;
}

/* Hide the tooltip content by default */
[data-tooltip]:before,
[data-tooltip]:after {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Position tooltip above the element */
[data-tooltip]:before {
  position: absolute;
  bottom: 150%;
  left: 50%;
  margin-bottom: 5px;
  margin-left: -80px;
  padding: 7px;
  width: 160px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  background-color: #000;
  background-color: hsla(0, 0%, 20%, 0.9);
  color: #fff;
  content: attr(data-tooltip);
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
}

/* Triangle hack to make tooltip look like a speech bubble */
[data-tooltip]:after {
  position: absolute;
  bottom: 150%;
  left: 50%;
  margin-left: -5px;
  width: 0;
  border-top: 5px solid #000;
  border-top: 5px solid hsla(0, 0%, 20%, 0.9);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: " ";
  font-size: 0;
  line-height: 0;
}

/* Show tooltip content on hover */
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  visibility: visible;
  opacity: 1;
}

.progress-wrap {
  max-width: 100px;
  padding: 5px 0;
}

.ph-approval-bar {
  background: rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 4px;
  display: block;
  border-radius: 99px;
}

.ph-approval-amount {
  position: relative;
  height: 4px;
  display: block;
  background: #6f7c8a;
  border-radius: 99px;
  width: 0;

  .approved & {
    background: #7bae54;
  }
}

#ph-project-approval-status {
  background: none;
  border: none;
  box-shadow: none;
}

#ph-project-approval-status { 
  .hndle,
  .handlediv,
  .handle-actions,
  .postbox-header {
    display: none;
  }
}

.meta-approval-wrap {
  .progress-wrap {
    max-width: none;
    background: #d8e0e6;
    padding: 5px 10px 10px 10px;

    .ph-approval-bar {
      background: #fff;
    }

    &.approved {
      background: #e0f7ce;
    }
  }

  .approval-badge {
    margin: auto;
    width: 100%;
    padding: 10px;
    text-align: center;
    display: block;
    box-sizing: border-box;
    border-radius: 3px 3px 0 0;
  }
}

.post-type-ph-website,
.post-type-ph-project {
  div#edit-slug-box {
    padding: 0 0 0 10px;
    i {
      opacity: 0.5;
      font-size: 10px;
      display: inline-block;
      vertical-align: middle;
      line-height: 15px;
      margin: 0 0 0 2px;
      cursor: help;
    }
    > button {
      display: none;
    }
    .ph-magic-link-wrap {
      padding: 6px 0;
      border-radius: 3px;
      color: #77777c;
      margin-top: 15px;
      margin-left: -8px;

      .clipboard-confirm {
        margin: 0 10px;
      }

      .ph-tooltip-wrap .ph-tooltip {
        width: 200px !important;
        white-space: normal;
      }

      > strong:not([class]) {
        display: none;
      }

      a {
        color: #0073aa;
        margin-left: 6px;
      }
      button {
        display: none;
      }
      &:hover button {
        display: initial;
      }
    }
  }
}

// tooltips
.ph-tooltip-wrap {
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased; /* webkit text rendering fix */
  position: relative;
}

.ph-tooltip-wrap .ph-tooltip {
  background: #23282d;
  bottom: 100%;
  color: #fff !important;
  font-size: 12px !important;
  line-height: 12px !important;
  display: block;
  left: 50%;
  margin-bottom: 15px;
  opacity: 0;
  padding: 10px;
  white-space: nowrap;
  pointer-events: none;
  position: absolute;
  width: auto !important;
  height: auto !important;
  border-radius: 3px !important;
  transform: translateY(10px) translateX(-50%);
  -webkit-transition: all 0.25s ease-out;
  -moz-transition: all 0.25s ease-out;
  -ms-transition: all 0.25s ease-out;
  -o-transition: all 0.25s ease-out;
  transition: all 0.25s ease-out;
  transition-delay: 0.5s;
  -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  -ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  -o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
}

/* This bridges the gap so you can mouse into the tooltip without it disappearing */
.ph-tooltip-wrap .ph-tooltip:before {
  bottom: -20px;
  content: " ";
  display: block;
  height: 20px;
  left: 0;
  position: absolute;
  width: 100%;
}

/* CSS Triangles - see Trevor's post */
.ph-tooltip-wrap .ph-tooltip:after {
  border-left: solid transparent 10px;
  border-right: solid transparent 10px;
  border-top: solid #23282d 10px;
  bottom: -10px;
  content: " ";
  height: 0;
  left: 50%;
  margin-left: -13px;
  position: absolute;
  width: 0;
}

.ph-tooltip-wrap:hover .ph-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) translateX(-50%);
}
