/* =========================================================
   GENEBEAN / MARSS — FLOATING TOOL DOCK
   Compact icon-only module launcher
========================================================= */

.gb-marss-dock-wrapper {
  --gb-marss-dock-x: 0px;
  --gb-marss-dock-y: 0px;

  position: fixed;
  z-index: 99970;

  top: 88px;
  left: calc(var(--app-rail-width, 78px) + 18px);

  width: 58px;

  transform:
    translate3d(
      var(--gb-marss-dock-x),
      var(--gb-marss-dock-y),
      0
    );

  pointer-events: none;
  will-change: transform;
}

.gb-marss-dock-wrapper[hidden] {
  display: none !important;
}

.gb-marss-dock-wrapper > * {
  pointer-events: auto;
}

/* =========================================================
   DOCK SURFACE
========================================================= */

.gb-marss-dock {
  position: relative;

  width: 58px;
  padding: 7px;

  border: 1px solid rgba(143, 212, 189, 0.20);
  border-radius: 22px;

  background:
    radial-gradient(circle at 50% 0%, rgba(143, 212, 189, 0.16), transparent 48%),
    radial-gradient(circle at 50% 22%, rgba(127, 181, 255, 0.10), transparent 58%),
    linear-gradient(180deg, rgba(10, 18, 34, 0.985), rgba(4, 7, 16, 0.99));

  color: var(--zom-text-main, rgba(244, 248, 255, 0.96));

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.58),
    0 18px 46px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(143, 212, 189, 0.055),
    0 0 30px rgba(143, 212, 189, 0.10);

  box-sizing: border-box;
}

/* =========================================================
   DOCK HEADER
========================================================= */

.gb-marss-dock__head {
  display: grid;
  place-items: center;
  gap: 5px;

  padding-bottom: 7px;
  margin-bottom: 7px;

  border-bottom: 1px solid rgba(143, 212, 189, 0.13);
}

.gb-marss-dock__brand {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(143, 212, 189, 0.26);
  border-radius: 999px;

  background:
    radial-gradient(circle at 50% 18%, rgba(143, 212, 189, 0.22), transparent 64%),
    linear-gradient(180deg, rgba(21, 42, 48, 0.96), rgba(7, 14, 24, 0.98));

  color: var(--zom-green, #8fd4bd);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 0 18px rgba(143, 212, 189, 0.16);
}
.gb-marss-dock__brand {
  padding: 0;
  cursor: pointer;
}
.gb-marss-dock__brand:hover {
  color: #ffffff;
  border-color: rgba(143, 212, 189, 0.44);
  transform: translateY(-1px);
}
/*collapsed behavior*/
.gb-marss-dock-wrapper.is-collapsed {
  width: 54px;
}

.gb-marss-dock-wrapper.is-collapsed .gb-marss-dock {
  width: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gb-marss-dock-wrapper.is-collapsed .gb-marss-dock__head {
  padding: 0;
  margin: 0;
  border-bottom: 0;
}

.gb-marss-dock-wrapper.is-collapsed .gb-marss-dock__brand {
  width: 54px;
  height: 54px;
  border-radius: 999px;
}

.gb-marss-dock-wrapper.is-collapsed .gb-marss-dock__title,
.gb-marss-dock-wrapper.is-collapsed .gb-marss-dock__close,
.gb-marss-dock-wrapper.is-collapsed .gb-marss-dock__tools {
  display: none;
}
/*end collapsed behavior*/

.gb-marss-dock__title {
  font-size: 0.55rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(213, 244, 235, 0.78);
}

.gb-marss-dock__close {
  width: 24px;
  height: 24px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 1px solid rgba(143, 212, 189, 0.16);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.035);
  color: rgba(226, 245, 239, 0.76);

  font-size: 16px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.gb-marss-dock__close:hover {
  color: #ffffff;
  background: rgba(143, 212, 189, 0.10);
  border-color: rgba(143, 212, 189, 0.34);
  transform: translateY(-1px);
}

/* =========================================================
   TOOL ICONS
========================================================= */

.gb-marss-dock__tools {
    scrollbar-width: none;
    overflow-y: auto;
    overscroll-behavior: auto;
    display: grid;
    gap: 7px;
}

.gb-marss-tool-btn {
  position: relative;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 1px solid rgba(145, 164, 220, 0.16);
  border-radius: 15px;

  background:
    radial-gradient(circle at 50% 20%, rgba(127, 181, 255, 0.10), transparent 68%),
    linear-gradient(180deg, rgba(18, 27, 50, 0.94), rgba(7, 12, 25, 0.98));

  color: rgba(198, 209, 240, 0.78);

  font-size: 1rem;
  line-height: 1;

  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 8px 18px rgba(0, 0, 0, 0.20);

  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.gb-marss-tool-btn:hover:not(:disabled) {
  color: #ffffff;

  background:
    radial-gradient(circle at 50% 20%, rgba(143, 212, 189, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(23, 45, 56, 0.96), rgba(9, 17, 30, 0.98));

  border-color: rgba(143, 212, 189, 0.36);

  transform: translateY(-1px);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 22px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(143, 212, 189, 0.14);
}

.gb-marss-tool-btn.is-active {
  color: var(--zom-green, #8fd4bd);

  background:
    radial-gradient(circle at 50% 18%, rgba(143, 212, 189, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(31, 64, 70, 0.82), rgba(12, 28, 38, 0.92));

  border-color: rgba(143, 212, 189, 0.44);

  box-shadow:
    0 0 0 1px rgba(143, 212, 189, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(143, 212, 189, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.gb-marss-tool-btn.is-active::before {
  content: "";

  position: absolute;
  left: -7px;

  width: 3px;
  height: 22px;

  border-radius: 999px;

  background:
    linear-gradient(
      180deg,
      var(--zom-green, #8fd4bd),
      var(--zom-blue, #7fb5ff)
    );

  box-shadow:
    0 0 14px rgba(143, 212, 189, 0.75),
    0 0 22px rgba(127, 181, 255, 0.30);
}

.gb-marss-tool-btn:disabled,
.gb-marss-tool-btn.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

/* =========================================================
   TOOLTIPS
========================================================= */

.gb-marss-tool-btn[data-tooltip]::after {
    min-height: fit-content;
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    min-width: 150px;
    max-width: fit-content;
    padding: 9px 11px;
    border: 1px solid rgba(145, 164, 220, 0.18);
    border-radius: 14px;
    background: radial-gradient(circle at 14% 0%, rgba(143, 212, 189, 0.10), transparent 64%),
    linear-gradient(180deg, rgba(10, 16, 32, 0.985), rgba(4, 7, 16, 0.99));
    color: rgba(244, 248, 255, 0.94);
    font-size: 0.72rem;
    line-height: 1.3;
    font-weight: 700;
    text-align: left;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(143, 212, 189, 0.045),
    0 0 22px rgba(143, 212, 189, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-5px);
    transition: opacity 130ms ease,
    transform 130ms ease;
    z-index: 10;
}

.gb-marss-tool-btn[data-tooltip]::before {
  z-index: 11;
}

.gb-marss-tool-btn[data-tooltip]:hover::after,
.gb-marss-tool-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* =========================================================
   FUTURE DRAG PERIMETER HOOK
   The JS can create/use this later like ZAR Help.
========================================================= */

.gb-marss-dock-wrapper .gb-marss-dock-drag-perimeter {
  position: absolute;
  inset: 0;

  pointer-events: none;
  z-index: 50;
}

.gb-marss-dock-wrapper .gb-marss-dock-drag-perimeter__edge {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  background: transparent;
}

.gb-marss-dock-wrapper .gb-marss-dock-drag-perimeter__edge--top {
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
}

.gb-marss-dock-wrapper .gb-marss-dock-drag-perimeter__edge--right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 10px;
}

.gb-marss-dock-wrapper .gb-marss-dock-drag-perimeter__edge--bottom {
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
}

.gb-marss-dock-wrapper .gb-marss-dock-drag-perimeter__edge--left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 10px;
}
/* =========================================================
   GB MARSS DOCK — DRAG STATE
========================================================= */

.gb-marss-dock-drag-handle {
  touch-action: none;
  user-select: none;
}

.gb-marss-dock-wrapper.is-dragging,
.gb-marss-dock-wrapper.is-dragging .gb-marss-dock-drag-handle {
  transition: none !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .gb-marss-dock-wrapper {
    top: 76px;
    left: 10px;

    width: 54px;
  }

  .gb-marss-dock {
    width: 54px;
    padding: 6px;
    border-radius: 20px;
  }

  .gb-marss-dock__brand {
    width: 32px;
    height: 32px;
  }

  .gb-marss-tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .gb-marss-tool-btn[data-tooltip]::after {
    display: none;
  }
}