/* Wolski Gym visual editor — hidden until Ctrl + three clicks */
.wg-editor-toolbar,
.wg-editor-inspector,
.wg-editor-menu-panel,
.wg-editor-update-panel,
.wg-editor-modal,
.wg-editor-toast,
.wg-editor-image-browser {
  font-family: Montserrat, Arial, sans-serif;
  box-sizing: border-box;
}

html.wg-editor-open,
html.wg-editor-open body {
  overflow-x: clip;
}

body.wg-editor-mode {
  cursor: crosshair;
}

body.wg-editor-mode [data-wg-edit-key] {
  transition: outline-color .12s ease, box-shadow .12s ease;
}

body.wg-editor-mode .wg-editor-hovered {
  outline: 2px dashed rgba(245, 130, 32, .8) !important;
  outline-offset: 2px !important;
}

body.wg-editor-mode .wg-editor-selected {
  outline: 3px solid #f58220 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(245, 130, 32, .2) !important;
}

.wg-editor-toolbar,
.wg-editor-inspector,
.wg-editor-menu-panel,
.wg-editor-update-panel,
.wg-editor-modal *,
.wg-editor-image-browser * {
  box-sizing: border-box;
}

.wg-editor-toolbar {
  position: fixed;
  z-index: 2147483638;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 20px);
  padding: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(15, 15, 17, .96);
  color: #fff;
  box-shadow: 0 16px 45px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
}

.wg-editor-toolbar__title {
  padding: 0 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.wg-editor-btn {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 9px;
  background: #242428;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.wg-editor-btn:hover,
.wg-editor-btn:focus-visible {
  border-color: #f58220;
  outline: none;
}

.wg-editor-btn--primary {
  border-color: #f58220;
  background: #f58220;
  color: #111;
}

.wg-editor-btn--danger {
  background: #411d1d;
}

.wg-editor-inspector,
.wg-editor-update-panel {
  position: fixed;
  z-index: 2147483637;
  top: 68px;
  right: 10px;
  width: min(360px, calc(100vw - 20px));
  max-height: calc(100vh - 78px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(17,17,19,.97);
  color: #fff;
  box-shadow: 0 20px 55px rgba(0,0,0,.42);
  backdrop-filter: blur(16px);
}

.wg-editor-inspector[hidden],
.wg-editor-menu-panel[hidden],
.wg-editor-update-panel[hidden],
.wg-editor-modal[hidden],
.wg-editor-image-browser[hidden] {
  display: none !important;
}

.wg-editor-inspector h3,
.wg-editor-menu-panel h3,
.wg-editor-update-panel h3,
.wg-editor-modal h3,
.wg-editor-image-browser h3 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 17px;
  line-height: 1.2;
}

.wg-editor-object-meta {
  margin: 0 0 13px;
  color: #aaa;
  font-size: 11px;
  word-break: break-word;
}

.wg-editor-section {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.wg-editor-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.wg-editor-section-title {
  display: block;
  margin-bottom: 8px;
  color: #f58220;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.wg-editor-label {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  color: #ddd;
  font-size: 11px;
  font-weight: 700;
}

.wg-editor-input,
.wg-editor-textarea,
.wg-editor-select {
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: #0d0d0f;
  color: #fff;
  font: 500 12px/1.4 Montserrat, Arial, sans-serif;
}

.wg-editor-textarea {
  min-height: 104px;
  resize: vertical;
}

.wg-editor-input:focus,
.wg-editor-textarea:focus,
.wg-editor-select:focus {
  border-color: #f58220;
  outline: none;
}

.wg-editor-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.wg-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.wg-editor-help {
  margin: 8px 0 0;
  color: #999;
  font-size: 10px;
  line-height: 1.5;
}

.wg-editor-file {
  display: none;
}

.wg-editor-modal,
.wg-editor-image-browser {
  position: fixed;
  z-index: 2147483640;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0,0,0,.72);
}

.wg-editor-modal__card,
.wg-editor-image-browser__card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  background: #171719;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

.wg-editor-image-browser__card {
  width: min(920px, 100%);
}

.wg-editor-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  background: #28282c;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.wg-editor-error {
  min-height: 18px;
  margin: 8px 0 0;
  color: #ff8585;
  font-size: 11px;
}

.wg-editor-image-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.wg-editor-image-item {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  background: #0f0f11;
}

.wg-editor-image-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #222;
}

.wg-editor-image-item__body {
  padding: 9px;
}

.wg-editor-image-item__body p {
  min-height: 31px;
  margin: 0 0 8px;
  color: #bbb;
  font-size: 10px;
  line-height: 1.45;
  word-break: break-word;
}

.wg-editor-toast {
  position: fixed;
  z-index: 2147483641;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 25px);
  padding: 10px 14px;
  border-radius: 10px;
  background: #101012;
  color: #fff;
  box-shadow: 0 12px 35px rgba(0,0,0,.4);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

.wg-editor-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 760px) {
  .wg-editor-toolbar {
    top: 5px;
    width: calc(100vw - 10px);
    justify-content: flex-start;
    overflow-x: auto;
    border-radius: 10px;
  }

  .wg-editor-toolbar__title {
    display: none;
  }

  .wg-editor-inspector,
  .wg-editor-menu-panel,
.wg-editor-update-panel {
    top: auto;
    right: 5px;
    bottom: 5px;
    left: 5px;
    width: auto;
    max-height: 58vh;
    border-radius: 11px;
  }

  .wg-editor-image-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .wg-editor-image-list {
    grid-template-columns: 1fr;
  }
}

/* Live editor validation */
.wg-editor-input.is-invalid {
  border-color: #d83b3b !important;
  box-shadow: 0 0 0 3px rgba(216, 59, 59, .16) !important;
}

/* Dragging and container alignment controls */
.wg-editor-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.wg-editor-btn[aria-pressed="true"] {
  border-color: #f58220;
  background: #f58220;
  color: #111;
}

body.wg-editor-drag-mode [data-wg-edit-key] {
  cursor: grab !important;
}

body.wg-editor-drag-mode [data-wg-edit-key].wg-editor-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  touch-action: none !important;
}

body.wg-editor-drag-mode .wg-editor-selected {
  box-shadow: 0 0 0 5px rgba(245, 130, 32, .2), 0 0 0 9px rgba(245, 130, 32, .08) !important;
}

@media (max-width: 430px) {
  .wg-editor-grid-2 {
    grid-template-columns: 1fr;
  }
}


/* Editor tabs and update manager */
.wg-editor-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #0d0d0f;
}

.wg-editor-tab {
  min-height: 28px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #aaa;
  font: 800 11px/1.2 Montserrat, Arial, sans-serif;
  cursor: pointer;
}

.wg-editor-tab:hover,
.wg-editor-tab:focus-visible {
  color: #fff;
  outline: none;
}

.wg-editor-tab.is-active {
  background: #f58220;
  color: #111;
}

.wg-editor-update-status {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  background: #0d0d0f;
}

.wg-editor-update-status > p {
  margin: 0;
  color: #aaa;
  font-size: 11px;
}

.wg-editor-update-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.wg-editor-update-version span {
  color: #aaa;
  font-size: 11px;
}

.wg-editor-update-version strong {
  color: #f58220;
  font-size: 16px;
}

.wg-editor-update-details {
  display: grid;
  gap: 7px;
  margin: 0;
}

.wg-editor-update-details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.wg-editor-update-details dt,
.wg-editor-update-details dd {
  margin: 0;
  font-size: 10px;
}

.wg-editor-update-details dt { color: #888; }
.wg-editor-update-details dd { color: #ddd; text-align: right; word-break: break-word; }

.wg-editor-update-checks {
  display: grid;
  gap: 5px;
  margin-top: 11px;
}

.wg-editor-update-checks span {
  padding: 6px 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
}

.wg-editor-update-checks .is-ok {
  background: rgba(45, 166, 83, .13);
  color: #78d995;
}

.wg-editor-update-checks .is-error {
  background: rgba(216, 59, 59, .13);
  color: #ff8585;
}

.wg-editor-update-file {
  display: grid;
  place-items: center;
  min-height: 76px;
  margin-top: 11px;
  padding: 12px;
  border: 1px dashed rgba(245,130,32,.55);
  border-radius: 10px;
  background: rgba(245,130,32,.06);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.wg-editor-update-file:hover { border-color: #f58220; }
.wg-editor-update-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.wg-editor-update-progress {
  min-height: 18px;
  margin: 9px 0 0;
  color: #bbb;
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .wg-editor-tabs { flex: 0 0 auto; }
  .wg-editor-update-panel { max-height: 65vh; }
}


/* Server menu and page manager */
.wg-editor-menu-panel {
  position: fixed;
  z-index: 2147483637;
  top: 68px;
  right: 10px;
  width: min(430px, calc(100vw - 20px));
  max-height: calc(100vh - 78px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(17,17,19,.97);
  color: #fff;
  box-shadow: 0 20px 55px rgba(0,0,0,.42);
  backdrop-filter: blur(16px);
}

.wg-editor-menu-list {
  display: grid;
  gap: 10px;
}

.wg-editor-menu-item {
  padding: 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #0d0d0f;
}

.wg-editor-menu-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.wg-editor-menu-item__head strong {
  color: #f58220;
  font-size: 12px;
  line-height: 1.3;
}

.wg-editor-menu-item__head .wg-editor-btn {
  min-height: 29px;
  padding: 5px 8px;
  text-decoration: none;
}

.wg-editor-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #ddd;
  font-size: 11px;
  font-weight: 700;
}

.wg-editor-check input {
  width: 17px;
  height: 17px;
  accent-color: #f58220;
}

.wg-editor-menu-create .wg-editor-btn--primary {
  width: 100%;
}

@media (max-width: 760px) {
  .wg-editor-menu-panel {
    top: auto;
    right: 5px;
    bottom: 5px;
    left: 5px;
    width: auto;
    max-height: 65vh;
    border-radius: 11px;
  }
}
