/* Scope overrides to the dynamic entries, leaving other theme sidebars unchanged. */
.side.floating-entries {
  box-sizing: border-box;
  position: fixed;
  width: 222px;
  max-width: calc(100vw - 16px);
  height: auto;
  top: min(430px, 45vh);
  right: 9px;
  max-height: calc(100vh - min(430px, 45vh) - 16px);
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 100;
}

.side.floating-entries > ul {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Override the theme's language-specific nth-child margins as well. */
html body .side.floating-entries > ul > li {
  position: relative;
  float: none;
  width: 100%;
  height: auto;
  margin: 0 !important;
  padding: 0;
  border: 0;
}

html body .side.floating-entries > ul > li > .sidebox {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  top: auto;
  right: auto;
  width: 100%;
  height: auto;
  min-height: 110px;
  padding: 12px 25px 12px 15px;
  overflow: visible;
  border-radius: 4px 15px 4px 15px;
  background: #4c8ecc;
  box-shadow: 0 2px 6px rgb(0 0 0 / 50%);
  opacity: 1;
  color: #fff;
  font-size: 15px;
  line-height: 1.4 !important;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.side.floating-entries .floating-entry-icon {
  float: none;
  flex: 0 0 38px;
  width: 38px;
  height: auto;
  margin: 10px 0 0;
}

.side.floating-entries .floating-entry-text {
  flex: 1;
  min-width: 0;
  color: #fff;
}

.side.floating-entries .floating-entry-content {
  display: block;
  white-space: pre-line;
}

html body .side.floating-entries > ul > li > .sidebox:hover,
html body .side.floating-entries > ul > li > .sidebox:focus,
html body .side.floating-entries > ul > li > .sidebox:active {
  color: #fff !important;
  text-decoration: none;
}

.side.floating-entries .adm_btnText {
  display: block;
  width: fit-content;
  margin: 6px 0 0;
  padding: 4px;
  border-radius: 4px;
  background: #f4b350;
  color: #fff;
  font-size: 14px;
}

.side.floating-entries .apply_close {
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 24px;
  cursor: pointer;
}

.side.floating-entries .apply_close:hover {
  color: #b41e23;
}

.side.floating-entries .apply_close:focus-visible,
.side.floating-entries .sidebox:focus-visible {
  outline: 2px solid #f4b350;
  outline-offset: 2px;
}

@media (max-height: 480px) {
  .side.floating-entries {
    top: 80px;
    max-height: calc(100vh - 96px);
  }
}
