.misticeasearc-global-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.2);
  backdrop-filter: brightness(0.2);
  -webkit-backdrop-filter: brightness(0.2);
  z-index: 999980;
}

.misticeasearc-window {
  position: fixed !important;
  z-index: 1000000;
  box-sizing: border-box;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
}

.misticeasearc-window.misticeasearc-modal {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.misticeasearc-window.misticeasearc-floating {
  transform: none;
}

@media (hover:hover) and (pointer:fine) {
  .misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-drag-handle {
    touch-action: none;
  }
  .misticeasearc-window.misticeasearc-dragging {
    user-select: none;
    -webkit-user-select: none;
  }
  .misticeasearc-window.misticeasearc-floating-controls-enabled:hover .misticeasearc-drag-handle {
    display: flex;
  }
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-drag-handle,
.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-pin-btn {
  position: absolute;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,0.93);
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000001;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-drag-handle {
  right: 0;
  bottom: 0;
  transform: translate(50%, 50%);
  cursor: grab;
  touch-action: none;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-pin-btn {
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled.misticeasearc-show-pin .misticeasearc-pin-btn,
.misticeasearc-window.misticeasearc-floating-controls-enabled.misticeasearc-pinned .misticeasearc-pin-btn {
  display: flex;
}

@media (hover:hover) and (pointer:fine) {
  .misticeasearc-window.misticeasearc-floating-controls-enabled.misticeasearc-floating:hover .misticeasearc-pin-btn {
    display: flex;
  }
}

.misticeasearc-window.misticeasearc-floating-controls-enabled.misticeasearc-dragging .misticeasearc-drag-handle {
  cursor: grabbing;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-edge-grab {
  position: absolute;
  display: none;
  background: transparent;
  z-index: 1000000;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled.misticeasearc-dragging .misticeasearc-edge-grab {
  cursor: grabbing;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-edge-top {
  left: 44px;
  top: -6px;
  width: calc(100% - 88px);
  height: 12px;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-edge-right {
  top: 44px;
  right: -6px;
  width: 12px;
  height: calc(100% - 88px);
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-edge-bottom {
  left: 44px;
  bottom: -6px;
  width: calc(100% - 88px);
  height: 12px;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-edge-left {
  top: 44px;
  left: -6px;
  width: 12px;
  height: calc(100% - 88px);
}

@media (hover:hover) and (pointer:fine) {
  .misticeasearc-window.misticeasearc-floating-controls-enabled:hover .misticeasearc-edge-grab {
    display: block;
  }
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-drag-handle img,
.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-pin-btn img {
  width: 70%;
  height: 70%;
  display: block;
}

.misticeasearc-window.misticeasearc-floating-controls-enabled.misticeasearc-pinned .misticeasearc-pin-btn img {
  filter: brightness(0) saturate(100%) invert(88%) sepia(88%) saturate(4800%) hue-rotate(2deg) brightness(118%) contrast(106%)
    drop-shadow(0 0 2px rgba(255, 234, 0, 0.85));
}

.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-drag-handle:hover,
.misticeasearc-window.misticeasearc-floating-controls-enabled .misticeasearc-pin-btn:hover {
  background: rgba(0,0,0,0.85);
}

.misticeasearc-window .misticeasearc-close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000002;
  background: #000;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
  appearance: none;
  -webkit-appearance: none;
}

.misticeasearc-window .misticeasearc-close img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.misticeasearc-window .misticeasearc-close:hover img,
.misticeasearc-window .misticeasearc-close:focus-visible img {
  opacity: 0.9;
}

@media (hover:hover) and (pointer:fine) {
  .misticeasearc-window .misticeasearc-close {
    display: none;
  }
  .misticeasearc-window:hover .misticeasearc-close {
    display: flex;
  }
}

@media (max-width: 1024px) {
  .misticeasearc-window .misticeasearc-close {
    display: flex !important;
  }
}

.misticeasearc-window.misticeasearc-tablet .misticeasearc-close {
  display: flex !important;
}

.misticeasearc-window.misticeasearc-tablet.misticeasearc-floating-controls-enabled .misticeasearc-drag-handle,
.misticeasearc-window.misticeasearc-tablet.misticeasearc-floating-controls-enabled .misticeasearc-pin-btn {
  display: flex !important;
}

.misticeasearc-window.misticeasearc-tablet.misticeasearc-floating-controls-enabled .misticeasearc-edge-grab {
  display: block !important;
}

.misticeasearc-window.misticeasearc-phone .misticeasearc-close {
  display: flex !important;
}

.misticeasearc-window.misticeasearc-phone.misticeasearc-floating-controls-enabled .misticeasearc-drag-handle,
.misticeasearc-window.misticeasearc-phone.misticeasearc-floating-controls-enabled .misticeasearc-pin-btn,
.misticeasearc-window.misticeasearc-phone.misticeasearc-floating-controls-enabled .misticeasearc-edge-grab {
  display: none !important;
}

.misticeasearc-window .misticeasearc-close::before {
  content: "";
  position: absolute;
  inset: -10px;
}

@keyframes misticeasearcPinBtnFlash {
  0%   { box-shadow: 0 0 0 0 rgba(255,215,64,0.0), 0 0 4px rgba(0,0,0,0.3); }
  35%  { box-shadow: 0 0 0 3px rgba(255,215,64,0.55), 0 0 6px rgba(0,0,0,0.35); }
  100% { box-shadow: 0 0 0 0 rgba(255,215,64,0.0), 0 0 4px rgba(0,0,0,0.3); }
}

.misticeasearc-window.misticeasearc-pin-flash .misticeasearc-pin-btn {
  animation: misticeasearcPinBtnFlash 0.55s ease-out;
}

@keyframes misticeasearcWindowLimitFlash {
  0%   { box-shadow: 0 0 0 0 rgba(255,140,0,0.0), 0 0 6px rgba(0,0,0,0.0); }
  35%  { box-shadow: 0 0 0 3px rgba(255,140,0,0.92), 0 0 0 6px rgba(255,140,0,0.28), 0 0 10px rgba(0,0,0,0.25); }
  100% { box-shadow: 0 0 0 0 rgba(255,140,0,0.0), 0 0 6px rgba(0,0,0,0.0); }
}

.misticeasearc-window.misticeasearc-limit-flash {
  animation: misticeasearcWindowLimitFlash 0.55s ease-out;
}
