/* 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;

    &:focus {
      border-color: #6332f6;
      outline: none;
      box-shadow: 0 0 0 1px rgba(99, 50, 246, 0.1) !important;
    }

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

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

  input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;           
    max-width: 250px;      
    height: 48px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 12px;   /* Arredondamento do campo externo */
    cursor: pointer;
    padding: 12px 16px;
    position: relative;
    display: flex;
    align-items: center;

    &::before {
      content: "Código da cor";
      position: absolute;
      left: 16px;
      color: #bbbbbb;
      font-size: 14px;
      font-weight: 300;
    }

    &::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%;
    }

    &:focus {
      border-color: #6332f6;
      outline: none;
    }
  }
}
