/* Anyzone 0.1.36 - front-end real viewport adapter */
@import url('./anyzone-adminbar.css');

:root {
  --anyzone-front-adminbar-height: 32px;
  --anyzone-front-width: 1200px;
  --anyzone-front-height: 900px;
  --anyzone-front-bg: #1d2327;
  --anyzone-front-accent: #8aaed1;
  --anyzone-front-vertical-gap: clamp(0px, calc((100vh - var(--anyzone-front-adminbar-height, 32px) - var(--anyzone-front-height, 900px)) / 2), 28px);
  --anyzone-glass-bg: rgba(15, 20, 28, .38);
  --anyzone-glass-bg-strong: rgba(15, 20, 28, .50);
  --anyzone-glass-field: rgba(80, 85, 95, .22);
  --anyzone-glass-field-hover: rgba(105, 115, 145, .32);
  --anyzone-glass-border: rgba(255, 255, 255, .10);
  --anyzone-glass-text: rgba(255, 255, 255, .92);
  --anyzone-glass-muted: rgba(255, 255, 255, .66);
}

html.anyzone-front-lock,
body.anyzone-front-lock {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.anyzone-front-active {
  background: var(--anyzone-front-bg) !important;
}

#anyzone-front-stage {
  position: fixed;
  top: var(--anyzone-front-adminbar-height, 32px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99980;
  display: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: var(--anyzone-front-bg);
}

/* The workspace can still pan when a viewport is larger than the browser, but
 * its own chrome stays invisible so the preview document has the only visible
 * scrollbar. */
#anyzone-front-stage::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body.anyzone-front-active #anyzone-front-stage {
  display: block;
}

#anyzone-front-canvas {
  box-sizing: border-box;
  width: 100%;
  min-width: calc(var(--anyzone-front-width, 1200px) + 48px);
  min-height: max(100%, calc(var(--anyzone-front-height, 900px) + var(--anyzone-front-vertical-gap) + var(--anyzone-front-vertical-gap)));
  padding: var(--anyzone-front-vertical-gap) 24px;
}

#anyzone-front-shell {
  position: relative;
  box-sizing: border-box;
  width: var(--anyzone-front-width, 1200px);
  height: var(--anyzone-front-height, 900px);
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  outline: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 20px 60px rgba(0,0,0,.30);
  transition: width .18s ease, height .18s ease, box-shadow .18s ease, outline-color .18s ease;
}

#anyzone-front-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

#anyzone-front-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  background: rgba(29,35,39,.76);
  pointer-events: none;
}

#anyzone-front-shell.is-loading #anyzone-front-loading {
  display: grid;
}

#anyzone-front-loading span {
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,.28);
  border-top-color: rgba(255,255,255,.92);
  border-radius: 50%;
  animation: anyzone-front-spin .7s linear infinite;
}

@keyframes anyzone-front-spin {
  to { transform: rotate(360deg); }
}

/* Desktop is a native/fluid workspace by default, not a 1200px preset. */
body.anyzone-front-mode-desktop.anyzone-front-desktop-fluid #anyzone-front-canvas {
  min-width: 100%;
  min-height: 100%;
  padding: 0;
}

body.anyzone-front-mode-desktop.anyzone-front-desktop-fluid #anyzone-front-shell {
  width: 100%;
  height: var(--anyzone-front-height, 900px);
  margin: 0;
  outline: 0;
  box-shadow: none;
}

/* Shared toolbar contract. Front-end uses the same visible control layout as the Customizer adapter. */
#anyzone-front-toolbar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 100000;
  display: none;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  max-width: calc(100vw - 40px);
  padding: 12px 14px;
  transform: translateX(-50%);
  border: 1px solid var(--anyzone-glass-border);
  border-radius: 11px;
  background: var(--anyzone-glass-bg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 10px 24px rgba(0,0,0,.14),
    0 22px 46px rgba(0,0,0,.12);
  color: var(--anyzone-glass-text);
  font: 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}

body.anyzone-front-active #anyzone-front-toolbar {
  display: flex;
}

#anyzone-front-toolbar .anyzone-group {
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  gap: 10px;
  padding: 0 18px;
  border-right: 1px solid rgba(255,255,255,.12);
  white-space: nowrap;
  box-sizing: border-box;
}

#anyzone-front-toolbar .anyzone-group:first-of-type {
  padding-left: 4px;
}

#anyzone-front-toolbar .anyzone-group:last-child,
#anyzone-front-toolbar .anyzone-fast-group {
  padding-right: 0;
  border-right: 0;
}

#anyzone-front-toolbar .anyzone-brand-group {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
}

#anyzone-front-toolbar .anyzone-brand-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
}

#anyzone-front-toolbar .anyzone-brand-stack strong {
  color: var(--anyzone-glass-text);
  font-size: 16px;
}

#anyzone-front-toolbar .anyzone-version {
  color: var(--anyzone-glass-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .01em;
}

#anyzone-front-toolbar .anyzone-brand-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#anyzone-front-hide,
#anyzone-front-gear {
  width: auto !important;
  min-width: 50px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--anyzone-glass-text) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: .01em;
  text-transform: uppercase;
}

#anyzone-front-hide:hover,
#anyzone-front-gear:hover,
#anyzone-front-gear.is-active,
#anyzone-front-gear[aria-expanded="true"] {
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
}

#anyzone-front-toolbar .anyzone-view-group {
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 108px;
}

#anyzone-front-mode,
#anyzone-front-rotate,
#anyzone-front-save-profile,
#anyzone-front-revert-profile,
#anyzone-front-toolbar .anyzone-step,
#anyzone-front-settings-popover button,
#anyzone-front-save-modal button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid transparent;
  background: var(--anyzone-glass-field);
  color: var(--anyzone-glass-text);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 10px 24px rgba(0,0,0,.14),
    0 22px 46px rgba(0,0,0,.12);
  cursor: pointer;
  line-height: 1;
}

#anyzone-front-mode,
#anyzone-front-rotate {
  width: 96px;
  min-width: 96px;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 4px !important;
  font-size: 13px;
  font-weight: 600;
}

#anyzone-front-mode:hover,
#anyzone-front-rotate:hover:not(:disabled),
#anyzone-front-save-profile:hover,
#anyzone-front-revert-profile:hover:not(:disabled),
#anyzone-front-toolbar .anyzone-step:hover,
#anyzone-front-settings-popover button:hover,
#anyzone-front-save-modal button:hover {
  background: var(--anyzone-glass-field-hover);
}

#anyzone-front-rotate.is-inactive,
#anyzone-front-rotate:disabled {
  opacity: .42;
  cursor: default;
  color: var(--anyzone-glass-muted) !important;
}

#anyzone-front-toolbar .anyzone-profile-group {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  min-width: 236px;
  padding-left: 20px;
  padding-right: 20px;
}

#anyzone-front-device {
  width: 214px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 32px 0 12px;
  border: 1px solid var(--anyzone-glass-border);
  border-radius: 5px;
  background: rgba(255,255,255,.88);
  color: #1d2327;
  font-size: 14px;
  text-align: left !important;
  text-align-last: left !important;
  box-sizing: border-box;
}

#anyzone-front-toolbar .anyzone-profile-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 28px;
}

#anyzone-front-toolbar .anyzone-profile-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--anyzone-glass-muted);
  font-size: 12px;
  font-weight: 500;
}

#anyzone-front-toolbar .anyzone-profile-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#anyzone-front-save-profile,
#anyzone-front-revert-profile {
  width: auto !important;
  min-width: 50px !important;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
}

#anyzone-front-revert-profile.is-disabled,
#anyzone-front-revert-profile:disabled {
  opacity: .40;
  cursor: default;
}

#anyzone-front-profile-dirty {
  display: inline-block;
  width: auto;
  margin-left: 1px;
  color: #ffb3b3;
  font-weight: 800;
  line-height: 1;
}

#anyzone-front-toolbar .anyzone-size-group {
  gap: 16px;
  padding-left: 20px;
  padding-right: 20px;
}

#anyzone-front-toolbar .anyzone-dim-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
}

#anyzone-front-toolbar input[type="number"] {
  width: 72px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 8px;
  border: 1px solid var(--anyzone-glass-border);
  border-radius: 5px;
  background: rgba(255,255,255,.88);
  color: #1d2327;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  box-sizing: border-box;
  -moz-appearance: textfield;
  appearance: textfield;
}

#anyzone-front-toolbar input[type="number"]::-webkit-outer-spin-button,
#anyzone-front-toolbar input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#anyzone-front-toolbar .anyzone-dim-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

#anyzone-front-toolbar .anyzone-dim-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  color: var(--anyzone-glass-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: lowercase;
}

#anyzone-front-toolbar .anyzone-mini-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#anyzone-front-toolbar .anyzone-step {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border-radius: 4px !important;
  font-size: 15px;
  font-weight: 700;
}

#anyzone-front-toolbar .anyzone-fast-group {
  justify-content: center;
  min-width: 68px;
  padding-left: 14px;
}

#anyzone-front-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px !important;
  min-width: 60px !important;
  height: 60px !important;
  min-height: 60px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--anyzone-glass-field) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.18) !important;
}

/* The Anyzone mark remains fixed. Only its center state bar changes axis. */
#anyzone-front-toolbar .anyzone-state-mark,
#anyzone-front-mark.is-landscape .anyzone-state-mark {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 48px !important;
  height: 38px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
}

#anyzone-front-toolbar .anyzone-state-mark i {
  display: block;
  flex: 0 0 auto;
  width: 7px;
  height: 22px;
  border-radius: 4px;
  background: var(--anyzone-front-accent);
  opacity: .30;
  box-shadow: 0 2px 5px rgba(0,0,0,.10);
  transition: width 140ms ease, height 140ms ease, opacity 140ms ease;
}

#anyzone-front-toolbar .anyzone-state-mark i:nth-child(2) {
  width: 9px;
  height: 32px;
  opacity: .72;
}

#anyzone-front-mark.is-landscape .anyzone-state-mark i:nth-child(2) {
  width: 30px;
  height: 9px;
}

#anyzone-front-mark.is-neutral .anyzone-state-mark i {
  opacity: .32;
}

#anyzone-front-mark.is-neutral .anyzone-state-mark i:nth-child(2) {
  width: 9px;
  height: 32px;
  opacity: .48;
}

#anyzone-front-mark:not(:disabled):hover .anyzone-state-mark i:nth-child(2) {
  opacity: .94;
}

#anyzone-front-mark.is-inactive {
  opacity: .50;
  cursor: default;
}

#anyzone-front-toolbar button:focus-visible,
#anyzone-front-toolbar select:focus-visible,
#anyzone-front-toolbar input:focus-visible,
#anyzone-front-settings-popover button:focus-visible,
#anyzone-front-settings-popover input:focus-visible,
#anyzone-front-save-modal button:focus-visible,
#anyzone-front-save-modal input:focus-visible {
  border-color: rgba(255,255,255,.28) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22) !important;
  outline: 2px solid transparent !important;
}

/* Options popover */
#anyzone-front-settings-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: min(520px, calc(100vw - 48px));
  padding: 16px 18px;
  border: 1px solid var(--anyzone-glass-border);
  border-radius: 11px;
  background: var(--anyzone-glass-bg-strong);
  color: var(--anyzone-glass-text);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 10px 24px rgba(0,0,0,.16),
    0 22px 46px rgba(0,0,0,.14);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  box-sizing: border-box;
}

#anyzone-front-settings-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

#anyzone-front-settings-popover .anyzone-popover-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-right: 18px;
  border-right: 1px solid rgba(255,255,255,.12);
  font-weight: 800;
}

#anyzone-front-settings-popover .anyzone-popover-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#anyzone-front-settings-popover .anyzone-popover-main label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--anyzone-glass-muted);
  font-weight: 600;
}

#anyzone-front-settings-popover button {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-weight: 700;
}

#anyzone-front-options-close {
  width: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  font-size: 18px !important;
}

#anyzone-front-workspace-bg {
  width: 38px;
  height: 34px;
  min-height: 34px;
  padding: 2px;
  border: 1px solid var(--anyzone-glass-border);
  border-radius: 7px;
  background: rgba(255,255,255,.88);
  cursor: pointer;
}

/* Save profile modal */
#anyzone-front-save-modal {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  z-index: 1000100;
  width: min(380px, calc(100vw - 48px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

#anyzone-front-save-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

#anyzone-front-save-modal .anyzone-save-modal-card {
  padding: 14px;
  border: 1px solid var(--anyzone-glass-border);
  border-radius: 11px;
  background: var(--anyzone-glass-bg-strong);
  color: var(--anyzone-glass-text);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 10px 24px rgba(0,0,0,.16),
    0 22px 46px rgba(0,0,0,.14);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}

#anyzone-front-save-modal .anyzone-save-modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 800;
}

#anyzone-front-save-close {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  font-size: 18px !important;
}

#anyzone-front-save-modal .anyzone-save-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  color: var(--anyzone-glass-muted);
  font-size: 12px;
  font-weight: 700;
}

#anyzone-front-save-name {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--anyzone-glass-border);
  border-radius: 7px;
  background: rgba(255,255,255,.88);
  color: #1d2327;
  box-sizing: border-box;
}

#anyzone-front-save-modal .anyzone-save-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

#anyzone-front-save-cancel,
#anyzone-front-save-confirm {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-weight: 700;
}

/* Temporary light fallback while we evaluate glass. */
body.anyzone-front-theme-light #anyzone-front-toolbar,
body.anyzone-front-theme-light #anyzone-front-settings-popover,
body.anyzone-front-theme-light #anyzone-front-save-modal .anyzone-save-modal-card {
  background: rgba(224,224,224,.98);
  color: #1d2327;
  border-color: rgba(0,0,0,.14);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.anyzone-front-theme-light #anyzone-front-toolbar .anyzone-brand-stack strong,
body.anyzone-front-theme-light #anyzone-front-toolbar .anyzone-brand-actions button,
body.anyzone-front-theme-light #anyzone-front-toolbar .anyzone-profile-label,
body.anyzone-front-theme-light #anyzone-front-toolbar .anyzone-dim-name,
body.anyzone-front-theme-light #anyzone-front-settings-popover .anyzone-popover-main label,
body.anyzone-front-theme-light #anyzone-front-save-modal .anyzone-save-modal-field {
  color: #1d2327 !important;
}

body.anyzone-front-theme-light #anyzone-front-toolbar .anyzone-version {
  color: #646970;
}

body.anyzone-front-theme-light #anyzone-front-mode,
body.anyzone-front-theme-light #anyzone-front-rotate,
body.anyzone-front-theme-light #anyzone-front-save-profile,
body.anyzone-front-theme-light #anyzone-front-revert-profile,
body.anyzone-front-theme-light #anyzone-front-toolbar .anyzone-step,
body.anyzone-front-theme-light #anyzone-front-settings-popover button,
body.anyzone-front-theme-light #anyzone-front-save-modal button {
  background: rgba(80, 75, 75, .42);
  color: #fff;
}

@media (max-width: 1220px) {
  #anyzone-front-toolbar .anyzone-group {
    padding-left: 11px;
    padding-right: 11px;
  }
  #anyzone-front-toolbar .anyzone-brand-group {
    min-width: 112px;
  }
  #anyzone-front-toolbar .anyzone-profile-group {
    min-width: 204px;
  }
  #anyzone-front-device {
    width: 184px !important;
  }
  #anyzone-front-toolbar .anyzone-size-group {
    gap: 10px;
  }
}

@media (max-width: 980px) {
  #anyzone-front-toolbar {
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 782px) {
  :root { --anyzone-front-adminbar-height: 46px; }
}

/* 0.1.49: user-controlled workspace image, overlay, opacity, and blur. */
#anyzone-front-stage {
  isolation: isolate;
  background: var(--anyzone-workspace-color, var(--anyzone-front-bg, #1d2327));
}

#anyzone-front-stage::before,
#anyzone-front-stage::after {
  content: "";
  position: fixed;
  top: var(--anyzone-front-adminbar-height, 32px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

#anyzone-front-stage::before {
  background-color: var(--anyzone-workspace-color, #1d2327);
  background-image: var(--anyzone-workspace-image, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(var(--anyzone-workspace-blur, 0px));
  transform: scale(1.06);
  transform-origin: center;
}

#anyzone-front-stage::after {
  background: var(--anyzone-workspace-overlay, rgba(29,35,39,1));
}

#anyzone-front-canvas {
  position: relative;
  z-index: 1;
}
