/* =========================================================
   🔵 ROOT INPUT CONTAINER
   ight
llm_input_submit_area.css
========================================================= */

.genebean_guard_input {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;

  padding: 10px;
  border-radius: 26px;

  background: linear-gradient(180deg, #191a24, #161721);
  border: 1px solid rgba(131,131,140,0.25);

  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 10px 30px rgba(0,0,0,0.6),
    0 0 0 1px rgba(70,90,180,0.15);

  display: flex;
  flex-direction: column;
  gap: 10px;

  transform: translateZ(0);
}


/* =========================================================
   🧠 MODE (CITIES) SECTION
========================================================= */

.zar-mode-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zar-mode-label {
  font-size: 13px;
  color: rgba(180,200,255,0.85);
  letter-spacing: 0.04em;

  padding: 6px 10px;
  border-radius: 10px;

  background: rgba(120,140,255,0.08);
  border: 1px solid rgba(120,140,255,0.2);

  backdrop-filter: blur(6px);
}
button.zar-mode-trigger.zar-all-cities {
    height: 35px;
    color: #9fb2ff;
    /* margin: 10px 0px; */
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(120,140,255,0.25);
    background: rgba(120,140,255,0.08);
    border-radius: 15px;
    align-items: center;
    gap: 5px;
    display: flex;
}

/* =========================================================
   ✍️ TEXTAREA (MAIN INPUT)
========================================================= */

.zar-input-main {
  width: 100%;
}

.genebean_guard_textarea {
  scrollbar-width: thin;
  width: 100%;
  height: 63px;

  padding: 16px;

  border-radius: 16px;
  border: 1px solid rgba(131,131,140,0.2);

  background: linear-gradient(180deg, #1a1c2a, #151721);

  color: #e6ecff;
  font-size: 0.95rem;

  resize: none;
  outline: none;

  transition: all 0.2s ease;
}

.genebean_guard_textarea:focus {
  border-color: rgba(120,160,255,0.6);
  box-shadow:
    0 0 0 1px rgba(120,160,255,0.4),
    0 10px 30px rgba(0,0,0,0.6);
}

.genebean_guard_textarea::placeholder {
  color: rgba(160,170,200,0.5);
}


/* =========================================================
   🎛 CONTROL BAR
========================================================= */

.zar-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* =========================================================
   🧠 MODEL SECTION
========================================================= */
.zar-control-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  height: auto;
  font-size: 0.85rem;
  flex: 1 1 auto;
}

.zar-model-trigger {
    height: 35px;
    /* padding: 7px 12px; */
    border-radius: 15px;
    /* font-size: 12px; */
    color: #9fb2ff;
    background: rgba(120,140,255,0.08);
    border: 1px solid rgba(120,140,255,0.25);
    cursor: pointer;
    transition: all 0.2s ease;
}
.zar-chip:hover {
  background: rgba(120,140,255,0.2);
  color: #fff;
}

.zar-chip.active {
  background: rgba(120,140,255,0.35);
  border-color: rgba(160,180,255,0.7);
  color: #fff;
}


/* =========================================================
   🚀 ACTIONS (SEND + UPLOAD)
========================================================= */

.zar-control-right {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
}
/* =========================================================
   🚀 ZAR SUBMIT V2 — REPLACED (STABLE + PREMIUM)
========================================================= */
.zar-submit-v2 {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid rgba(131, 131, 140, 0.24);
    border-radius: 999px;
    background: linear-gradient(135deg, #5569ae, #0a0b10);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 8px 20px rgba(0,0,0,0.45),
    0 0 0 1px rgba(70,90,180,0.15);
    transition: transform 0.15s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.zar-submit-v2:hover {
  border-color: rgba(140,170,255,0.62);
}

.zar-submit-v2:active {
  transform: translateY(1px);
}


/* =========================================================
   CONTENT LAYERS
========================================================= */

.zar-submit-v2-send,
.zar-submit-v2-loading {
  position: absolute;

  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: opacity 0.2s ease, transform 0.2s ease;
}

.zar-submit-v2-send {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.zar-submit-v2-loading {
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}


/* =========================================================
   LOADER RING
========================================================= */

.zar-submit-v2-ring {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 34px;
  height: 34px;

  border-radius: 999px;

  border: 2.5px solid rgba(122, 166, 255, 0.16);
  border-top-color: rgba(122, 166, 255, 0.95);
  border-right-color: rgba(192, 108, 255, 0.9);

  transform: translate(-50%, -50%);
  animation: zar-submit-v2-spin 0.9s linear infinite;

  z-index: 0;
}

@keyframes zar-submit-v2-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.zar-submit-v2-stop {
  position: relative;
  z-index: 1;
  color: white;
}


/* =========================================================
   STATE
========================================================= */

.zar-submit-v2.is-loading .zar-submit-v2-send {
  opacity: 0;
  transform: scale(0.72);
}

.zar-submit-v2.is-loading .zar-submit-v2-loading {
  opacity: 1;
  pointer-events: auto;
}
/* =========================================================
   ➕ UPLOAD BUTTON
========================================================= */

.zar-upload-trigger {
    width: 54px;
    height: 54px;
    /* border-radius: 12px; */
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: rgba(120,140,255,0.06); */
    /* border: 1px solid rgba(120,140,255,0.2); */
    cursor: pointer;
    transition: all 0.2s ease;
}
/*.zar-upload-trigger:hover {
  background: rgba(120,140,255,0.2);
}*/
.zar-upload-trigger svg {
  color: #cfd8ff;
  transition: transform 0.2s ease;
}

.zar-upload-trigger:hover svg {
  transform: scale(1.2) rotate(5deg);
}


/* TOOLTIP */

.zar-upload-tooltip {
  position: absolute;
  bottom: 60px;
  right: 0;

  padding: 10px;
  border-radius: 10px;

  background: rgba(20,25,50,0.95);
  color: #dbe6ff;
  font-size: 12px;

  opacity: 0;
  pointer-events: none;

  transition: 0.2s ease;
}

.zar-upload-trigger:hover .zar-upload-tooltip {
  opacity: 1;
  transform: translateY(-4px);
}


/* =========================================================
   🧠 POPOVERS (MODE + MODEL)
========================================================= */

.zar-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;

  min-width: 260px;
  max-width: 320px;
  padding: 14px;
  border-radius: 14px;

  background: linear-gradient(135deg, #1d2135, #151721);
  border: 1px solid rgba(131,131,140,0.25);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.7),
    0 0 0 1px rgba(120,140,255,0.1);

  display: none;
  z-index: 9999;
}

.zar-popover.active {
  display: block;
  pointer-events: auto;
}

/* OPTIONS */

.zar-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zar-options button {
  padding: 6px 10px;
  border-radius: 8px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(120,140,255,0.15);

  color: #9aa7c7;
  font-size: 12px;

  cursor: pointer;
  transition: all 0.2s ease;
}

.zar-options button:hover {
    border: 1px solid rgba(120,140,255,0.15);
    background: none;
    color: #fff;
}

.zar-options button.active {
  background: rgba(120,140,255,0.4);
  border-color: rgba(160,180,255,0.7);
  color: #fff;
}

.zar-options button.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.zar-model-wrapper, .zar-city-selection-wrapper {
    height: 100%;
    position: relative;
}
.zar-input-container {
    width: 100%;
}

.zar-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.zar-control-row--primary {
  min-height: 40px;
}

.zar-control-row--utilities {
  min-height: 36px;
}

/* =========================================================
   🧰 UTILITIES MENU — MINIMAL / ICON-BASED
   - horizontal on desktop
   - constrained width on mobile
========================================================= */

.zar-utilities-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  min-width: 0;
}

.zar-utilities-trigger {
    cursor: pointer;
    color: #685bc1;
    border: 1px solid rgba(120,140,255,0.25);
    background: #1e2133;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
}
.zar-chip-caret {
  font-size: 11px;
  opacity: 0.8;
}

/* compact popover override */
.zar-utilities-popover {
  min-width: 0;
  width: max-content;
  max-width: min(520px, calc(100vw - 24px));
  padding: 10px;
}

.zar-utilities-popover .zar-popover-title {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #dfe6ff;
  opacity: 0.95;
}

/* horizontal menu on desktop */
.zar-utilities-grid {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 0;
}

/* each utility item */
.zar-utility-tile {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  min-width: 140px;
  padding: 10px 12px;

  border-radius: 12px;
  border: 1px solid rgba(120,140,255,0.16);
  background: rgba(255,255,255,0.04);

  color: #d8e1ff;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zar-utility-tile:hover {
  background: rgba(120,140,255,0.1);
  border-color: rgba(120,140,255,0.32);
  color: #ffffff;
  transform: translateY(-1px);
}

.zar-utility-tile:active {
  transform: translateY(0);
}

/* icon holder */
.zar-utility-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: rgba(120,140,255,0.08);
  border: 1px solid rgba(120,140,255,0.16);

  color: #b9c8ff;
}

.zar-utility-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* text block */
.zar-utility-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.zar-utility-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.1;
  color: inherit;
}

.zar-utility-meta {
  display: block;
  font-size: 0.72rem;
  line-height: 1.1;
  opacity: 0.68;
}

/* disabled */
.zar-utility-tile--disabled {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}

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

@media (max-width: 768px) {
  .zar-utilities-popover {
    width: min(280px, calc(100vw - 24px));
    max-width: min(280px, calc(100vw - 24px));
    padding: 10px;
  }

  .zar-utilities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .zar-utility-tile {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
  }

  .zar-utility-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .zar-utility-icon svg {
    width: 17px;
    height: 17px;
  }
}
@media (max-width: 768px) {
  .zar-popover {
      /* left: 0; */
      /* right: auto; */
      min-width: 180px;
      max-width: min(320px, calc(100vw - 32px));
  }

  .zar-upload-trigger {
      width: 34px;
      height: 54px;
  }
  .zar-control-bar {
      gap: 5px;
  }
  button.zar-mode-trigger.zar-all-cities {
      gap: 0;
/*       padding: 3px; */
      border-radius: 10px;
  }
  .zar-mode-trigger svg {
      width: 24px;
      height: 24px;
  }  
  .zar-model-trigger {
/*       padding: 5px; */
      border-radius: 10px;
  }
  .zar-input-container {
      padding: 10px;
      width: 100%;
      /* padding-bottom: 20px; */
  }
}
/* =========================================================
   ✨ GENERIC TRIGGER TOOLTIPS
   Reuses the upload-tooltip visual language
========================================================= */

.zar-model-wrapper,
.zar-city-selection-wrapper,
.zar-utilities-wrapper,
.zar-control-right,
.zar-upload-trigger,
.zar-submit-v2 {
  position: relative;
}

[data-tooltip] {
  position: relative;
}

/* Tooltip bubble */
[data-tooltip]::after {
  content: attr(data-tooltip);

  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  width: max-content;
  max-width: min(240px, calc(100vw - 32px));

  padding: 9px 11px;
  border-radius: 10px;

  background: rgba(20, 25, 50, 0.96);
  color: #dbe6ff;

  font-size: 11.5px;
  line-height: 1.35;
  font-weight: 500;
  text-align: center;

  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(120, 140, 255, 0.08);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;

  z-index: 10020;
}

/* Tooltip arrow */
[data-tooltip]::before {
  content: "";

  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%) translateY(6px);

  width: 10px;
  height: 10px;

  background: rgba(20, 25, 50, 0.96);
  clip-path: polygon(50% 100%, 0 0, 100% 0);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;

  z-index: 10019;
}

/* Desktop hover/focus */
@media (hover: hover) and (pointer: fine) {
  [data-tooltip]:hover::after,
  [data-tooltip]:hover::before,
  [data-tooltip]:focus-visible::after,
  [data-tooltip]:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

/* Tap-triggered mobile visibility */
[data-tooltip].is-tooltip-visible::after,
[data-tooltip].is-tooltip-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Popover-specific tooltip sizing */
.zar-popover [data-tooltip]::after {
  max-width: min(220px, calc(100vw - 32px));
  text-align: left;
}

/* Mobile sizing */
@media (max-width: 768px) {
  [data-tooltip]::after {
    max-width: min(210px, calc(100vw - 24px));
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.32;
  }
}
/* =========================================================
   FIX: FLOATING DRAG PANELS MUST NOT EXPAND THEIR TRIGGER AREA
========================================================= */

.genebean_guard_input {
  overflow: visible;
}


/* =========================================================
   NEW STYLE OVERRIDES 
========================================================= */
/* =========================================================
   ZAR INPUT SKIN — PORTAL / PROFESSIONAL COLOR ONLY
   Paste at bottom of llm_input_submit_area.css
   No layout changes
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --zar-input-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --zar-portal-bg-0: #060912;
  --zar-portal-bg-1: #0b1120;
  --zar-portal-bg-2: #111a2c;
  --zar-portal-bg-3: #17243a;

  --zar-portal-border: rgba(132, 160, 255, 0.18);
  --zar-portal-border-hover: rgba(132, 160, 255, 0.28);
  --zar-portal-border-focus: rgba(118, 156, 255, 0.46);

  --zar-portal-text: #eaf0ff;
  --zar-portal-muted: rgba(198, 210, 242, 0.66);
  --zar-portal-placeholder: rgba(203, 214, 244, 0.42);

  --zar-portal-blue: #7fb5ff;
  --zar-portal-blue-strong: #6ea8ff;
  --zar-portal-violet: #8b7cff;
  --zar-portal-green: #8fd4bd;

  --zar-portal-chip-bg: rgba(112, 138, 255, 0.085);
  --zar-portal-chip-bg-hover: rgba(112, 138, 255, 0.15);
  --zar-portal-chip-border: rgba(132, 160, 255, 0.22);
  --zar-portal-chip-text: rgba(206, 218, 255, 0.86);
}

/* =========================================================
   ROOT INPUT CONTAINER
========================================================= */

.genebean_guard_input {
    font-family: var(--zar-input-font);
    background: radial-gradient(circle at 50% 0%, rgba(92, 128, 255, 0.12), transparent 42%),
    radial-gradient(circle at 18% 18%, rgba(139, 124, 255, 0.08), transparent 36%),
    linear-gradient(180deg, var(--zar-portal-bg-3), var(--zar-portal-bg-2) 42%, var(--zar-portal-bg-1));
    border-color: var(--zar-portal-border);
    box-shadow: 0 1px 0 rgb(33 30 30) inset, 0 -1px 0 rgb(0 0 0) inset, 0 18px 44px rgb(0 0 0), 0 0 0 1px rgba(92, 128, 255, 0.08), 0 0 34px rgb(4 4 4 / 75%);
}

.genebean_guard_input:hover {
  border-color: var(--zar-portal-border-hover);

  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.55) inset,
    0 20px 48px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(92, 128, 255, 0.11),
    0 0 38px rgba(92, 128, 255, 0.12);
}

.genebean_guard_input:focus-within {
  border-color: var(--zar-portal-border-focus);

  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 -1px 0 rgba(0, 0, 0, 0.55) inset,
    0 22px 54px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(118, 156, 255, 0.16),
    0 0 38px rgba(92, 128, 255, 0.18),
    0 0 58px rgba(139, 124, 255, 0.10);
}

/* =========================================================
   TEXTAREA
========================================================= */

.genebean_guard_textarea {
  font-family: var(--zar-input-font);

  background:
    radial-gradient(circle at 50% 0%, rgba(92, 128, 255, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(22, 33, 55, 0.98), rgba(11, 17, 32, 0.98));

  border-color: rgba(132, 160, 255, 0.14);
  color: var(--zar-portal-text);

  caret-color: var(--zar-portal-green);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 0 0 1px rgba(120, 150, 255, 0.035);
}

.genebean_guard_textarea:focus {
  border-color: var(--zar-portal-border-focus);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 0 0 1px rgba(118, 156, 255, 0.10),
    0 0 24px rgba(92, 128, 255, 0.14);
}

.genebean_guard_textarea::placeholder {
  color: var(--zar-portal-placeholder);
}

/* =========================================================
   MODE / MODEL / UTILITY CHIPS
========================================================= */

.zar-mode-label,
button.zar-mode-trigger.zar-all-cities,
.zar-model-trigger,
.zar-utilities-trigger {
  font-family: var(--zar-input-font);

  color: var(--zar-portal-chip-text);
  background:
    linear-gradient(180deg, rgba(112, 138, 255, 0.105), rgba(112, 138, 255, 0.055));

  border-color: var(--zar-portal-chip-border);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 0 1px rgba(92, 128, 255, 0.035);
}

button.zar-mode-trigger.zar-all-cities:hover,
.zar-model-trigger:hover,
.zar-utilities-trigger:hover {
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 0%, rgba(127, 181, 255, 0.14), transparent 72%),
    rgba(112, 138, 255, 0.14);

  border-color: rgba(132, 160, 255, 0.36);
}

.zar-chip:hover {
  background: var(--zar-portal-chip-bg-hover);
  color: #ffffff;
}

.zar-chip.active {
  background:
    radial-gradient(circle at 50% 0%, rgba(127, 181, 255, 0.16), transparent 72%),
    rgba(112, 138, 255, 0.22);

  border-color: rgba(156, 181, 255, 0.58);
  color: #ffffff;
}

/* =========================================================
   SUBMIT BUTTON
========================================================= */

.zar-submit-v2 {
  background:
    radial-gradient(circle at 50% 18%, rgba(143, 212, 189, 0.16), transparent 62%),
    linear-gradient(135deg, #5f83ff 0%, #314d9f 46%, #080b14 100%);

  border-color: rgba(132, 160, 255, 0.32);
  color: #ffffff;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(92, 128, 255, 0.10),
    0 0 26px rgba(92, 128, 255, 0.18);
}

.zar-submit-v2:hover {
  border-color: rgba(143, 181, 255, 0.66);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 12px 28px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(92, 128, 255, 0.16),
    0 0 34px rgba(92, 128, 255, 0.24);
}

.zar-submit-v2-ring {
  border-color: rgba(127, 181, 255, 0.16);
  border-top-color: rgba(143, 212, 189, 0.96);
  border-right-color: rgba(127, 181, 255, 0.92);
}

.zar-submit-v2-stop {
  color: #ffffff;
}

/* =========================================================
   UPLOAD
========================================================= */

.zar-upload-trigger svg {
  color: rgba(223, 232, 255, 0.86);
}

.zar-upload-trigger:hover svg {
  color: #ffffff;
}

/* =========================================================
   POPOVERS
========================================================= */

.zar-popover {
  font-family: var(--zar-input-font);

  background:
    radial-gradient(circle at 18% 0%, rgba(92, 128, 255, 0.12), transparent 46%),
    linear-gradient(135deg, #152039, #0b1120);

  border-color: rgba(132, 160, 255, 0.2);

  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(92, 128, 255, 0.08),
    0 0 34px rgba(92, 128, 255, 0.08);
}

.zar-options button,
.zar-utility-tile {
  font-family: var(--zar-input-font);

  color: rgba(214, 224, 255, 0.82);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(132, 160, 255, 0.16);
}

.zar-options button:hover,
.zar-utility-tile:hover {
  color: #ffffff;
  background: rgba(112, 138, 255, 0.12);
  border-color: rgba(132, 160, 255, 0.34);
}

.zar-options button.active {
  background:
    radial-gradient(circle at 50% 0%, rgba(127, 181, 255, 0.18), transparent 72%),
    rgba(112, 138, 255, 0.26);

  border-color: rgba(156, 181, 255, 0.62);
  color: #ffffff;
}

.zar-popover-title,
.zar-utilities-popover .zar-popover-title {
  color: var(--zar-portal-text);
}

.zar-utility-icon {
  background: rgba(112, 138, 255, 0.08);
  border-color: rgba(132, 160, 255, 0.16);
  color: var(--zar-portal-blue);
}

.zar-utility-title {
  color: rgba(235, 241, 255, 0.94);
}

.zar-utility-meta {
  color: rgba(198, 210, 242, 0.62);
}

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

.zar-upload-tooltip,
[data-tooltip]::after {
  font-family: var(--zar-input-font);

  background:
    linear-gradient(180deg, rgba(15, 24, 45, 0.98), rgba(8, 13, 26, 0.98));

  color: rgba(226, 235, 255, 0.92);

  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(132, 160, 255, 0.12);
}

[data-tooltip]::before {
  background: rgba(10, 16, 30, 0.98);
}

/* =========================================================
   MOBILE — CITY TRIGGER ICON ONLY
   Keeps JS hooks untouched:
   .zar-mode-trigger, .zar-all-cities, data-mode="manual_city"
========================================================= */

@media (max-width: 768px) {
  .zar-mode-trigger.zar-all-cities.zar-mobile-icon-only {
    width: 46px;
    min-width: 46px;
    height: 42px;
    padding: 0 !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0 !important;
    border-radius: 14px;
    overflow: hidden;
  }

  .zar-mobile-icon-only__label {
    display: none !important;
  }

  .zar-mobile-icon-only__icon {
    width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;
    margin: 0;
  }

  .zar-mobile-icon-only__icon svg {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0;
  }
}
/* =========================================================
   MOBILE — KEEP CITY TRIGGER ICON ONLY
========================================================= */

@media (max-width: 768px) {
  .zar-mode-trigger.zar-all-cities {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 42px;
    padding: 0 !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0 !important;
    white-space: nowrap;
    overflow: hidden;
  }

  .zar-mode-trigger.zar-all-cities svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    margin: 0;
  }

  .zar-mode-trigger.zar-all-cities {
    font-size: 0;
    line-height: 0;
  }

  .zar-mode-trigger.zar-all-cities svg,
  .zar-mode-trigger.zar-all-cities svg * {
    font-size: initial;
    line-height: initial;
  }
}


/* =========================================================
   ZAR INPUT CONSOLE — DESKTOP DRAGGABLE UPGRADE
   Runtime classes are added by zar_input_ui.js.
   Mobile remains normal docked input.
========================================================= */

:root {
  --zar-input-drag-edge-size: 10px;
}

/* Movement host.
   JS writes:
   --zar-input-drag-x
   --zar-input-drag-y
*/
.genebean_guard_input.is-desktop-draggable-ready {
  transform:
    translate3d(
      var(--zar-input-drag-x, 0px),
      var(--zar-input-drag-y, 0px),
      0
    );

  will-change: transform;
}

/* Once user moves it, let it float above nearby workspace elements. */
.genebean_guard_input.is-input-user-positioned {
  z-index: 70;
}

/* Dragging visual feedback. */
.genebean_guard_input.is-input-dragging {
  transition: none !important;

  filter:
    drop-shadow(0 18px 34px rgba(0, 0, 0, 0.48))
    drop-shadow(0 0 18px rgba(120, 160, 255, 0.24));
}

/* The wrapper becomes the broad desktop handle base,
   but interactive children are protected by JS ignoreFrom. */
.genebean_guard_input.is-desktop-draggable-ready .zar-input-wrapper.zar-input-drag-handle {
  cursor: var(--zar-cursor-grab, grab);
  touch-action: none;
  user-select: none;
}

/* Cursor while dragging */
.genebean_guard_input.is-input-dragging,
.genebean_guard_input.is-input-dragging .zar-input-drag-handle,
.genebean_guard_input.is-input-dragging .zar-input-drag-perimeter__edge {
  cursor: var(--zar-cursor-grabbing, grabbing) !important;
}

/* =========================================================
   INPUT DRAG PERIMETER
   Injected by shared zar_draggable_panel.js:
   .zar-input-drag-perimeter
     .zar-input-drag-perimeter__edge--top/right/bottom/left
========================================================= */

.zar-input-drag-perimeter {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  border-radius: inherit;
}

.zar-input-drag-perimeter__edge {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  cursor: var(--zar-cursor-grab, grab) !important;
}

/* top catch area */
.zar-input-drag-perimeter__edge--top {
  top: 0;
  left: 0;
  right: 0;
  height: var(--zar-input-drag-edge-size);
}

/* right catch area */
.zar-input-drag-perimeter__edge--right {
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--zar-input-drag-edge-size);
}

/* bottom catch area */
.zar-input-drag-perimeter__edge--bottom {
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--zar-input-drag-edge-size);
}

/* left catch area */
.zar-input-drag-perimeter__edge--left {
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--zar-input-drag-edge-size);
}

/* =========================================================
   PROTECT INTERACTIVE INPUT CONTENT
   These should never feel like drag surfaces.
========================================================= */

.genebean_guard_input .zar-input-main,
.genebean_guard_input .zar-input-main *,
.genebean_guard_input .zar-control-bar,
.genebean_guard_input .zar-control-bar *,
.genebean_guard_input .zar-popover,
.genebean_guard_input .zar-popover *,
.genebean_guard_input .zar-neighborhood-popover,
.genebean_guard_input .zar-neighborhood-popover * {
  cursor: auto;
  user-select: auto;
}

/* Preserve button/pill pointer cursors */
.genebean_guard_input button,
.genebean_guard_input label,
.genebean_guard_input .zar-chip,
.genebean_guard_input .zar-submit-v2,
.genebean_guard_input .zar-upload-trigger {
  cursor: pointer;
}

/* Preserve textarea behavior */
.genebean_guard_input textarea,
.genebean_guard_input input,
.genebean_guard_input select {
  cursor: text;
}

/* =========================================================
   MOBILE — DISABLE DRAG PRESENTATION
========================================================= */

@media (max-width: 768px) {
  .genebean_guard_input.is-desktop-draggable-ready {
    transform: translate3d(0, 0, 0);
    will-change: auto;
  }

  .genebean_guard_input.is-input-user-positioned {
    z-index: 50;
  }

  .zar-input-drag-perimeter {
    display: none !important;
  }

  .genebean_guard_input .zar-input-wrapper.zar-input-drag-handle,
  .zar-input-drag-perimeter__edge {
    cursor: auto !important;
    touch-action: auto;
  }
}
@media (min-width: 769px) {
  body.app-mode[data-mode="zomniverse_ai_research"] .genebean_guard_input.is-desktop-draggable-ready {
    position: fixed;
    left: 50%;
    bottom: 24px;
    width: min(448px, calc(100vw - 160px));
    max-width: 720px;
    margin: 0;
    z-index: 70;

    transform:
      translate3d(
        calc(-50% + var(--zar-input-drag-x, 0px)),
        var(--zar-input-drag-y, 0px),
        0
      );

    will-change: transform;
  }

  body.app-mode[data-mode="zomniverse_ai_research"] .genebean_guard_input.is-input-user-positioned {
    z-index: 90;
  }
}
.zar-city-trigger--icon-only .zar-mobile-icon-only__label {
  display: none !important;
}

/* =========================================================
   ZAR INPUT CONSOLE — DESKTOP RESIZE
========================================================= */

@media (min-width: 769px) {
  body.app-mode[data-mode="zomniverse_ai_research"]
  .genebean_guard_input.is-desktop-draggable-ready {
    width: min(
      var(--zar-input-width, 720px),
      calc(100vw - 56px)
    );

    max-width: none;
  }

  .genebean_guard_input.is-desktop-resizable-ready {
    min-width: 320px;
  }

  .zar-input-resize-handle {
    position: absolute;
    top: 18px;
    bottom: 18px;
    width: 10px;
    z-index: 45;

    cursor: ew-resize !important;
    touch-action: none;
    user-select: none;
  }

  .zar-input-resize-handle--left {
    left: -3px;
  }

  .zar-input-resize-handle--right {
    right: -3px;
  }

  .genebean_guard_input.is-input-resizing {
    transition: none !important;

    filter:
      drop-shadow(0 18px 34px rgba(0, 0, 0, 0.48))
      drop-shadow(0 0 18px rgba(120, 160, 255, 0.24));
  }

  .genebean_guard_input.is-input-resizing,
  .genebean_guard_input.is-input-resizing .zar-input-resize-handle {
    cursor: ew-resize !important;
  }
}

@media (max-width: 768px) {
  .zar-input-resize-handle {
    display: none !important;
  }

  .genebean_guard_input {
    min-width: 0;
    max-width: 720px;
  }
}

