/* --------------------------------------------------
   The view info section at the top
   -------------------------------------------------- */

.view-info {
  width: 100%;
  font-size: 20px;
  margin-top: 1em;

  .table-cell {
    padding-bottom: 15px;

    &:first-child {
      padding-top: 9px;
      min-width: 130px;
    }

  }

  .table-row:last-child {
    .table-cell {
      padding-bottom: 0;
    }
  }

  label {
    vertical-align: top;
    margin: 0;
    display: block;
  }

  input {
    font-size: 20px;

    &.view-name {
      width: 100%;
      margin: 0;
      padding: 4px 8px;
    }
  }
}

/* -------------------------------------------------
   Shortcode read-only input
   ------------------------------------------------- */

#view-shortcode {
  direction: ltr;
  font-family: Consolas, Monaco, monospace;
  unicode-bidi: embed;
  display: inline-block;
  font-size: 18px;
  padding: 0 8px;
  line-height: 35px;
  width: 300px;
  color: #777;
  background: #FFF;
}

.form-view-shortcode .unsaved {
  color: #888;
  font-style: italic;
  line-height: 37px;
}

/* -------------------------------------------------
   Copy shortcode button
   ------------------------------------------------- */

#copy-shortcode {
  //display: inline-block;
  margin: 5px 1em;
  line-height: 26px;
}

#copy-message {
  opacity: 0;
  font-size: 14px;
  line-height: 26px;
  height: 26px;
  padding: 0 10px;
  margin: 0;
  display: inline-block;
  background: #00A4F3;
  color: #FFF;
  border-radius: 3px;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
  position: relative;
  top: -1px;
}

#copy-message.copied {
  opacity: 0;
  will-change: opacity;
  animation: showcopied 2s ease;
}

@keyframes showcopied {
  0% {
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* -------------------------------------------------
   Mode selector
   ------------------------------------------------- */

#view-mode {
  margin-top: 1em;

  label {
    display: inline-block;
    margin: 0 5px 0 0;
    padding: 0.5em 18px 0.5em 12px;
    border: 2px solid #ccc;
    border-radius: 20px;
    color: #888;
    position: relative;
    background: #fff;

    &.checked {
      position: relative;
      background: #00A4F3;
      color: #FFF;
      border-color: transparent;
      transition: all 0.1s ease;
    }

    &:hover {
      background: #FFF;
      color: #444;
      border-color: #00A4F3;
    }
  }

  input[type="radio"] {
    margin-right: 7px;
  }
}

.mode-list {
  display: inline-block;
}

.mode-line {
  display: none;
  position: absolute;
  border-left: 2px solid #00A4F3;
  height: 18px;
  top: 100%;
  left: calc( 50% - 1px );
  z-index: -1;

  label.checked & {
    display: block;
  }
}

.mode-description {
  box-sizing: border-box;
  background: #FFF;
  margin: 15px 5px 0 0;
  padding: 8px 20px;
  border: 2px solid #00A4F3;
  color: #00A4F3;
  text-align: center;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.3;
  min-height: 40px;
  transition: all 0.2s ease;
}
