/* TinyMCE Inline Editable Blocks */
.lr-block {
  border: 1px solid transparent;
  text-align: center;
  background: #eee;
  padding: 4px;
  border: 1px solid #ddd;

  .lr-block-name {
    font-weight: bold;
    font-size: 1em;
  }
  ul {
    margin-top: 8px;
    text-align: left;
  }
}
.lr-block:hover {
  border: 1px solid #ccc;
  background: #ddd;
  cursor: pointer;
}

/* Modal
========================================================================== */
.lroundups-modal {
  position: fixed;
  width: 500px;
  min-height: 180px;
  height: 100%;
  max-height: 600px;

  @media (max-height: 600px) {
    max-height: 400px;
  }

  background: #fafafa;
  border: 1px solid #ccc;
  top: 100px;
  left: 50%;
  margin-left: -250px;
  display: none;
  z-index: 100102;
  box-shadow: 0 1px 12px #999;
  border-radius: 4px;
  overflow: hidden;
}

.lroundups-modal-header {
  background: #eee;
  width: 100%;
  float: left;
  border-bottom: 1px solid #ddd;
}
.lroundups-modal-close {
  float: right;
  margin: 10px;
  color: #555;
}
.lroundups-modal-close:hover {
  color: #222;
  cursor: pointer;
}

.lroundups-modal-content,
.lroundups-modal-actions {
  padding: 10px;
  float: left;
  clear: both;
  width: 480px;
}
.lroundups-modal-content {
  font-size: 16px;
  margin-bottom: 50px;
  padding-top: 20px;
}
.lroundups-modal-actions {
  bottom: 0;
  position: absolute;
  text-align: right;
  border-top: 1px solid #eee;
  .spinner {
    display: none;
    float: left;
  }
}

#lroundups-modal-overlay {
  top: 0;
  left: 0;
  position: fixed;
  z-index: 100101;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  display: none;
}

body.lroundups-modal-open .lroundups-modal {
  display: none;
}
body.lroundups-modal-open .lroundups-modal.show,
body.lroundups-modal-open #lroundups-modal-overlay {
  display: block;
}

.lroundups-error-modal strong {
  color: #a00;
}

/* Specific to the roundup block editor modal */
.lroundups-modal {
  &.roundup-block-modal {
    top: 75px;
    width: 700px;
    margin-left: -340px;

    .lroundups-modal-content,
    .lroundups-modal-actions {
      width: 680px;
    }
  }
}
.flex-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
}
.lroundups-modal-content .section {
  width: 48%;

  &.added-section {
    padding-right: 2%;
    border-right: 1px solid #ccc;
  }

  .twitter-typeahead {
    width: 100%;
  }
  .typeahead {
    width: 90%;
  }
}

.roundup-posts-container {
  max-height: 276px;

  @media (max-height: 600px) {
    max-height: 200px;
  }

  overflow-y: scroll;
  margin-top: 16px;

  .added-section & {
    max-height: 320px;

    @media (max-height: 600px) {
      max-height: 400px;
    }
  }

  ul li {
    font-size: 14px;
    padding: 4px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
  }
  ul li:hover {
    cursor: move;
  }
  ul li.no-posts,
  ul li.loading {
    border: none;
  }
  .added-posts {
    min-height: 100px;
  }
  .available-posts {
    .actions .added {
      display: none;
    }
  }
  .added-posts {
    .actions .available {
      display: none;
    }
  }
  .ui-sortable-helper {
    background: #fafafa;
    box-shadow: 1px 1px 8px #555555;
    border: none;
    padding: 8px;
  }

  body.sorting & {
    border: 1px solid #999;
    box-shadow: inset 1px 1px 8px #ddd;
    padding: 8px;
  }

  .status {
    font-size: 13px;
    margin: 0.2em 0;
    color: #888;
    em {
      font-weight: bold;
    }
  }
}

/* Link/post edit modal */
.lroundups-modal.link-edit-modal {
  .lroundups-modal-content {
    input, textarea {
      width: 100%;
    }

    textarea {
      min-height: 100px;
    }
  }
}
