/* =========================================================
   FLOAT 3.0 — оформление обтекания
   ========================================================= */

/* Кнопка на панели редактора: сохраняет компактный вид панели */
#button-float {
  background-image: url("https://icons.iconarchive.com/icons/famfamfam/silk/16/text-dropcaps-icon.png");
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

#button-float:hover {
  opacity: .7;
}

/* Компактное меню */
#float-menu {
  display: none;
  position: absolute;
  z-index: 99999;
  width: 142px;
  box-sizing: border-box;
  padding: 7px 9px;
  background: #eeeeee;
  color: #333333;
  border: 1px solid #cccccc;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
  font-family: alegr, sans-serif;
  font-size: 10px;
}

#float-menu .float-title {
  margin-bottom: 6px;
  text-align: center;
  font-size: 10px;
  letter-spacing: .5px;
}

#float-menu .float-items {
  display: flex;
  justify-content: center;
  gap: 5px;
}

#float-menu .float-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 55px;
  height: 43px;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

#float-menu .float-choice:hover {
  background: #dddddd;
  border-color: #aaaaaa;
}

#float-menu .float-choice img {
  display: block;
  width: 17px !important;
  height: 17px !important;
  object-fit: contain;
  margin: 0 auto;
}

/* Обтекание в опубликованных сообщениях */
.post-content .post-float {
  display: block;
  max-width: 100%;
  margin: 15px;
}

.post-content .post-float-left {
  float: left;
  text-align: left;
}

.post-content .post-float-right {
  float: right;
  text-align: right;
}

/* Не даём следующим блокам схлопываться под плавающим элементом,
   если разметка сообщения заканчивается сразу после него. */
.post-content::after {
  content: "";
  display: table;
  clear: both;
}
