.web-resize-toolbar {
  position: fixed;
  top: max(168px, 18vh);
  left: max(2vw, 14px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(var(--accent-rgb), .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  box-shadow: 0 12px 30px rgba(var(--shadow-rgb), .13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: ns-resize;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, background .15s ease, border-color .15s ease;
}

.web-resize-toolbar.is-available {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.web-resize-toolbar.is-dragging {
  transition: none;
  cursor: grabbing;
}

body:not([data-desktop-app="true"]) .main-header-actions.is-sticky,
body:not([data-desktop-app="true"]) .post-editor-top-actions.is-sticky,
body:not([data-desktop-app="true"]) .tmx-header-actions.is-sticky,
body:not([data-desktop-app="true"]) .builder-header-actions.is-sticky {
  cursor: ns-resize;
}

body:not([data-desktop-app="true"]) .main-header-actions.is-sticky.is-dragging,
body:not([data-desktop-app="true"]) .post-editor-top-actions.is-sticky.is-dragging,
body:not([data-desktop-app="true"]) .tmx-header-actions.is-sticky.is-dragging,
body:not([data-desktop-app="true"]) .builder-header-actions.is-sticky.is-dragging {
  transition: none;
  cursor: grabbing;
}

.web-resize-item {
  position: relative;
}

.web-resize-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease;
}

.web-resize-button span {
  margin-right: -1px;
  font-size: 12px;
}

.web-resize-button:not(:disabled):hover,
.web-resize-button:not(:disabled):focus-visible,
.web-resize-item.is-open .web-resize-button {
  border-color: rgba(var(--accent-rgb), .62);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 9px 20px rgba(var(--shadow-rgb), .16);
  transform: translateY(-1px);
}

.web-resize-button:not(:disabled):active {
  transform: translateY(0) scale(.96);
}

.web-resize-popover {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  width: min(430px, calc(100vw - 96px));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateY(-50%);
  animation: webResizePopoverIn .16s ease both;
}

.web-resize-popover.is-closing {
  pointer-events: none;
  animation: webResizePopoverOut .14s ease both;
}

.web-resize-popover .web-resize-control-clone {
  margin: 0;
  width: 100%;
  border-color: rgba(var(--accent-rgb), .22);
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 14px 34px rgba(var(--shadow-rgb), .13);
  backdrop-filter: blur(30px) saturate(1.32);
  -webkit-backdrop-filter: blur(30px) saturate(1.32);
}

body.has-web-resize-toolbar .display-controls .text-size-controls,
body.has-web-resize-toolbar .display-controls .column-width-controls,
body.has-web-resize-toolbar .tmx-resize-controls .text-size-controls,
body.has-web-resize-toolbar .tmx-resize-controls .column-width-controls {
  display: none;
}

.dark-mode .web-resize-toolbar {
  background: rgba(24, 43, 45, .62);
  border-color: rgba(148, 226, 219, .18);
}

.dark-mode .web-resize-popover .web-resize-control-clone {
  border-color: rgba(148, 226, 219, .2);
  background: rgba(24, 43, 45, .92);
  backdrop-filter: blur(30px) saturate(1.25);
  -webkit-backdrop-filter: blur(30px) saturate(1.25);
}

.dark-mode .web-resize-button:not(:disabled):hover,
.dark-mode .web-resize-button:not(:disabled):focus-visible,
.dark-mode .web-resize-item.is-open .web-resize-button {
  background: rgba(32, 56, 58, .94);
}

@keyframes webResizePopoverIn {
  from {
    opacity: 0;
    transform: translate(-6px, -50%) scale(.98);
  }
  to {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
  }
}

@keyframes webResizePopoverOut {
  from {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-6px, -50%) scale(.98);
  }
}

@media print {
  .web-resize-toolbar {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .web-resize-toolbar {
    left: 10px;
  }

  .web-resize-popover {
    width: min(360px, calc(100vw - 82px));
  }

  .web-resize-popover .web-resize-control-clone input[type="range"] {
    min-width: 160px;
  }
}
