/**
 * 09. Modal
 */
.ectcsf-modal{
  position: fixed;
  z-index: 100101;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  &.hidden{
    display: none;
  }
}

.ectcsf-modal-icon{
  z-index: 100102;
}

.ectcsf-modal-table{
  display: table;
  width: 100%;
  height: 100%;
}

.ectcsf-modal-table-cell{
  display: table-cell;
  vertical-align: middle;
  margin: 100px 0;
}

.ectcsf-modal-inner{
  position: relative;
  z-index: 10;
  width: 760px;
  height: 750px;
  margin: 0 auto;
  background-color: #fff;
}

.ectcsf-modal-content{
  position: relative;
  overflow: hidden;
  overflow-y: auto;
  height: 595px;

  .ectcsf-shortcode-button{
    display: none;
  }

  .ectcsf-field{
    padding: 15px 30px 15px 15px;
  }

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

  h4{
    font-size: 13px;

    small{
      font-style: italic;
      font-weight: 400;
      color: #aaa;
    }
  }
}

.ectcsf-modal-title{
  position: relative;
  background-color: #fcfcfc;
  border-bottom: 1px solid #ddd;
  height: 36px;
  font-size: 16px;
  font-weight: 600;
  line-height: 36px;
  margin: 0;
  padding: 0 36px 0 16px;
}

.ectcsf-modal-header{
  width: 100%;
  padding: 14px 0;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;

  select{
    display: block;
    width: 250px;
    margin: 0 auto;
    font-size: 13px;
    line-height: 1;
    height: 30px;
    min-height: 30px;
    background-color: #fff;
  }
}

.ectcsf-modal-close{
  color: #666;
  padding: 0;
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;

  &:before{
    font: normal 20px/36px dashicons;
    content: "\f158";
    vertical-align: top;
    width: 36px;
    height: 36px;
  }

  &:hover{
    opacity: 0.5;
  }
}

.ectcsf-modal-insert-wrapper{
  text-align: center;
  width: 100%;
  padding: 15px 0;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
}

.ectcsf-modal-overlay{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.5;
}

/**
 * 09. 01. Shortcode Modal
 */
.ectcsf--repeatable{
  padding: 15px 15px 0 15px;
}

.ectcsf--repeat-button-block{
  text-align: center;
  padding-bottom: 15px;
}

.ectcsf--repeat-shortcode{
  position: relative;
  margin-bottom: 15px;
  border: 1px dashed #ddd;

  &:first-child{

    .ectcsf-repeat-remove{
      display: none;
    }
  }

  .ectcsf-repeat-remove{
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 10;
    cursor: pointer;
    display: inline-block;
    font-size: 11px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 2px;
    color: #fff;
    background-color: #e14d43;
    opacity: 0.5;

    &:hover{
      opacity: 0.5;
    }
  }
}

.ectcsf-shortcode-single{

  .ectcsf-modal-inner{
    height: 750px;
  }

  .ectcsf-modal-content{
    height: 652px;
  }
}

.elementor-editor-active{

  .ectcsf-shortcode-button{
    margin-left: 5px;
  }

  .ectcsf-modal .hidden{
    display: none !important;
  }
}

/**
 * 09. 02. Gutenberg Modal
 */
.ectcsf-shortcode-block{
  text-align: center;
  padding: 14px;
  font-size: 13px;
  background-color: #f5f5f5;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

.ectcsf-shortcode-block .components-button{
  margin-bottom: 10px;
}

/**
 * 09. 03. Icon Modal
 */
.ectcsf-modal-icon{

  .ectcsf-icon-title{
    padding: 15px 0;
    margin: 4px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border: 1px solid #eee;
    background-color: #f7f7f7;
  }

  .ectcsf-modal-header{
    text-align: center;
  }

  .ectcsf-icon-search{
    width: 50%;
    height: 40px;
    line-height: 40px;
  }

  i{
    cursor: pointer;
    display: inline-block;
    margin: 4px;
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 16px;
    color: #555;
    text-align: center;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    border-radius: 2px;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.05);

    &:hover {
      color: #fff;
      border-color: #222;
      background-color: #222;
    }
  }

  .ectcsf-modal-content{
    padding: 10px;
    height: 618px;
  }

  .ectcsf-error-text{
    padding: 10px;
  }
}

.ectcsf-modal-loading{
  display: none;
  position: absolute;
  left: 15px;
  top: 15px;
}

.ectcsf-loading{
  position: relative;
  width: 20px;
  height: 20px;
  background: #ccc;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.07);

  &:after{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    content: "";
    margin-top: -2px;
    margin-left: -2px;
    background-color: white;
    animation-duration: 0.5s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-name: ectcsfLoader;
    border-radius: 4px;
  }
}

@keyframes ectcsfLoader {
  0% {
    transform: rotate(0deg) translateX(-6px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(-6px) rotate(-360deg);
  }
}
