/* ==========================================================================
   Aniiland — desktop additions (loaded after mobile.css). Scoped to desktop only.
   1) Orders menu moves to the top-right, just under the header
   2) Ad slots: "top" (Production Plan title row) and "float" (closable bottom box)
   ========================================================================== */

/* 1) Orders: button on top, panel opens downward from it */
html:not(.aniiland-phone) .order-dock {
  top: calc(var(--m-header-h, 105px) + 12px);
  bottom: auto;
  right: 18px;
  flex-direction: column-reverse;
}
html:not(.aniiland-phone) .order-panel {
  max-height: min(calc(100vh - var(--m-header-h, 105px) - 96px), 780px);
}

/* 2a) Shared ad bits */
html:not(.aniiland-phone) .ad-slot-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #97aaba;
  opacity: .85;
}
html:not(.aniiland-phone) .ad-slot-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
html:not(.aniiland-phone) .ad-slot-body > * { max-width: 100%; }
html:not(.aniiland-phone) .ad-slot-body > ins { width: 100%; }
html:not(.aniiland-phone) .is-preview .ad-slot-body {
  border: 1px dashed #ffffff33;
  border-radius: 10px;
  color: #97aaba;
  font-size: 12px;
}
html:not(.aniiland-phone) :is(.ad-slot, .ad-float).is-unfilled { display: none !important; }

/* 2b) Production Plan title row: sits in the free space between title and badge */
html:not(.aniiland-phone) .ad-slot-top {
  flex: 1 1 auto;
  align-self: center;
  min-width: 0;
  max-width: 728px;
  margin: 0 24px;
  text-align: center;
}
html:not(.aniiland-phone) .ad-slot-top .ad-slot-label { margin: 0 0 4px; }
@media (max-width: 1259px) { html:not(.aniiland-phone) .ad-slot-top { display: none; } }

/* 2c) Floating box: bottom of the screen, white X on its own bar (never over the ad) */
html:not(.aniiland-phone) .ad-float {
  position: fixed;
  left: calc(320px + (100vw - 320px) / 2);
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 1150;
  width: min(760px, calc(100vw - 320px - 140px));
  background: #111b25;
  border: 1px solid #3c4d5b;
  border-radius: 14px;
  box-shadow: 0 14px 40px #000a;
  overflow: hidden;
}
html:not(.aniiland-phone) .ad-float.is-pending { visibility: hidden; }
html:not(.aniiland-phone) .ad-float-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px 5px 14px;
  border-bottom: 1px solid #ffffff12;
}
html:not(.aniiland-phone) .ad-float .ad-slot-body { padding: 6px 8px 8px; }
html:not(.aniiland-phone) .ad-float-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #ffffff66;
  border-radius: 50%;
  background: #ffffff14;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
html:not(.aniiland-phone) .ad-float-close:hover { background: #ffffff33; }
html:not(.aniiland-phone) .ad-float-close:focus-visible { outline: 2px solid #b88ce8; outline-offset: 2px; }
@media (max-width: 900px) { html:not(.aniiland-phone) .ad-float { display: none; } }

/* keep the end of the page reachable while the box is showing */
html:not(.aniiland-phone).ad-float-open body { padding-bottom: calc(var(--ad-float-h, 0px) + 28px); }
