@charset "utf-8";

.admin {
  position: fixed;
  right: 3px;
  bottom: 3px;
  z-index: 10;
  display: flex;
}

.admin-link {
  padding: 3px 10px;
  margin-left: 3px;
  color: #0d6efd;
  background-color: rgba(255, 255, 255, .8);
  border-top: 3px solid rgba(200, 0, 0, .5);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, .1);
}

.admin-link:hover {
  color: #fff;
  background-color: rgba(220, 0, 0, .7);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, .5);
}
.admin-link--edit { border-top: 3px solid rgba(0, 160, 0, .5); }
.admin-link--edit:hover { background-color: rgba(0, 190, 0, .7); }

.admin-categories li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.admin-categories li:hover { background-color: rgba(0, 0, 0, .05); }

.admin-categories li ul {
  width: 100%;
  padding-left: 12px;
}

.meta {
  margin-right: 10px;
  margin-left: auto;
  display: flex;
  gap: .5rem;
}

.meta .label {
  display: inline-block;
  margin-top: 2px;
  margin-bottom: 2px;
  text-align: left;
  vertical-align: top;
  opacity: .8;
}

.meta .to,
.tree-name {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}

@media (min-width: 1440px) {
  .meta .to,
  .tree-name { max-width: 300px; }
}
.tree-name { max-width: 330px; }
li li .tree-name { max-width: 323px; }
li li li .tree-name { max-width: 313px; }

@media (min-width: 1440px) {
  .tree-name { max-width: 570px; }
  li li .tree-name { max-width: 550px; }
  li li li .tree-name { max-width: 540px; }
}

.meta .to:hover,
.tree-name:hover { white-space: initial; }
.tree-name.disabled { text-decoration: line-through; }

.textarea-mono {
  font-family: "Lucida Console", Monaco, monospace;
  font-size: 14px;
}

.images__new { margin-bottom: 15px; }

.images__old,
.images__new { position: relative; }
.images__old:not(:empty)::before { content: "Текущие изображения"; }
.images__new:not(:empty)::before { content: "Новые изображения"; }

.images__old:not(:empty)::before,
.images__new:not(:empty)::before {
  position: absolute;
  top: -8px;
  left: 0;
  z-index: 1;
  padding: 2px 10px;
  font-size: 11px;
  color: #fff;
  background-color: #4c0a0a;
}

.images a {
  position: relative;
  display: inline-block;
}

.images a:hover::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 150px;
  padding-top: 60px;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  text-align: center;
  content: "Удалить";
  background-color: rgba(255, 0, 0, .5);
}

.images img {
  display: inline-block;
  width: 200px;
  height: 150px;
  margin-right: 5px;
  margin-bottom: 5px;
  object-fit: contain;
  background: #bcc0c3;
}

.images input {
  display: none;
}

.edit,
.goto {
  display: inline-block;
  width: 20px;
  height: 20px;
  overflow: hidden;
  text-indent: 100%;
}

.edit { background: url(../../img/edit.svg) no-repeat 50%/100%; }
.goto { background: url(../../img/goto.svg) no-repeat 50%/100%; }

/**
 * https://codepen.io/ademaro/pen/bGwpGej
 */
.tgl { display: none; }

.tgl,
.tgl::after,
.tgl::before,
.tgl *,
.tgl *::after,
.tgl *::before,
.tgl + .tgl-btn { box-sizing: border-box; }

.tgl::selection,
.tgl::after::selection,
.tgl::before::selection,
.tgl *::selection,
.tgl *::after::selection,
.tgl *::before::selection,
.tgl + .tgl-btn::selection { background: none; }

.tgl + .tgl-btn {
  position: relative;
  display: block;
  width: 4em;
  height: 2em;
  cursor: pointer;
  user-select: none;
  outline: 0;
}

.tgl + .tgl-btn::after,
.tgl + .tgl-btn::before {
  position: relative;
  display: block;
  width: 50%;
  height: 100%;
  content: "";
}
.tgl + .tgl-btn::after { left: 0; }
.tgl + .tgl-btn::before { display: none; }

.tgl-light + .tgl-btn {
  padding: 2px;
  background: #f0f0f0;
  border-radius: 2em;
  transition: all .4s ease;
}

.tgl-light + .tgl-btn::after {
  background: #fff;
  border-radius: 50%;
  transition: all .2s ease;
}

.tgl:checked + .tgl-btn::after { left: 50%; }
.tgl-light:checked + .tgl-btn { background: #9fd6ae; }

.form-floating > label { opacity: .7; }
.form-check-input { margin-top: .15em; }

.note {
  position: relative;
  padding-top: 25px;
  margin-top: 15px;
}

.note::before {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 5px;
  font-size: 13px;
  color: #fff;
  content: "Подсказка по таблице:";
  background-color: #ddd;
  border-radius: 3px;
  transition: .5s background-color;
}

.note:hover::before { background-color: #9bf; }
