/* This file may be used for providing additional customizations to the Trestle
 * admin. It will be automatically included within all admin pages.
 *
 * For organizational purposes, you may wish to define your customizations
 * within individual partials in this folder and they'll be required below.
 *

*/
.alert {
  align-items: normal;
}

.editor-toolbar {
  background: #ededed!important;
  padding: 3px!important;
}

.card.img-preview {
  border-radius: .5rem;
  overflow: hidden;
}

.image-preview-cell {
  width: 215px;
}

.image-preview-cell img {
  max-width: 200px;
}


/* 
  COLORS ADMIN
*/
main[data-context^="/admin/colors"] {
  .color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .column-preview {
    width: 60px;
    text-align: center;
  }

  .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    height: 48px;
    background-color: #ffffff;
    color: #333333;
    box-shadow: none !important;
    transition: border-color 0.2s;

    &::placeholder {
      color: #bbbbbb;
      font-weight: 300;
    }
  }

  .control-label {
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
    display: block;
  }

  #color_hex {
    border-right: 0;
  }

  #color_rgb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    max-width: 90px;
    height: 48px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-left: 0;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    padding: 12px 16px;
    position: relative;
    display: flex;
    align-items: center;

    &::after {
      content: "\f1fb";
      font-family: "Font Awesome 5 Free", "FontAwesome";
      font-weight: 900;
      position: absolute;
      right: 16px;
      color: #333;
      font-size: 16px;
    }

    &::-webkit-color-swatch-wrapper {
      padding: 0;
      display: flex;
      justify-content: flex-end;
    }

    &::-webkit-color-swatch {
      border: none;
      max-width: 20px; 
      height: 20px;
      border-radius: 50%;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
      margin-right: 35px;
    }

    &::-moz-color-swatch {
      border: none;
      max-width: 20px;
      height: 20px;
      border-radius: 50%;
    }
  }
}
