/* Staffino Octobot — compact professional chat */
:root {
  --okto-blue: #1d6fd8;
  --okto-blue-deep: #1557ad;
  --okto-blue-soft: #eef4fb;
  --okto-ink: #122033;
  --okto-muted: #6a7a8c;
  --okto-line: rgba(18, 32, 51, 0.1);
  --okto-radius: 18px;
  --okto-z: 1200;
}

.okto-fab {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: var(--okto-z);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem 0.4rem 0.4rem;
  border: none;
  border-radius: 999px;
  background: #1d6fd8;
  color: #fff;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(29, 111, 216, 0.32);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.okto-fab:hover,
.okto-fab:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(29, 111, 216, 0.4);
  outline: none;
}

.okto-fab__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

.okto-fab__label { white-space: nowrap; }

.okto-fab.is-open {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
}

.okto-panel {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: calc(var(--okto-z) + 1);
  width: min(380px, calc(100vw - 28px));
  max-height: min(560px, calc(100dvh - 28px));
  display: flex;
  flex-direction: column;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  transform-origin: bottom left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.okto-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.okto-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  background: #fff;
  color: var(--okto-ink);
  border-radius: var(--okto-radius);
  border: 1px solid rgba(29, 111, 216, 0.18);
  box-shadow:
    0 10px 28px rgba(18, 32, 51, 0.1),
    0 0 0 1px rgba(29, 111, 216, 0.04);
  overflow: hidden;
  animation: oktoCardIn 0.55s ease both;
}

.okto-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(120deg, rgba(29, 111, 216, 0.55), rgba(29, 111, 216, 0.05), rgba(29, 111, 216, 0.4));
  opacity: 0.55;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
  animation: oktoBorderPulse 3.2s ease-in-out infinite;
}

@keyframes oktoCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes oktoBorderPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}

.okto-panel__head,
.okto-inline-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  background: linear-gradient(135deg, #1d6fd8 0%, #1557ad 100%);
  color: #fff;
}

.okto-panel__head img,
.okto-inline-head img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  flex-shrink: 0;
}

.okto-panel__head-text,
.okto-inline-head__text {
  flex: 1;
  min-width: 0;
}

.okto-panel__head-text strong,
.okto-inline-head__text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.okto-panel__head-text span,
.okto-inline-head__text span {
  display: block;
  font-size: 0.72rem;
  opacity: 0.9;
  margin-top: 0.08rem;
}

.okto-panel__close {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.okto-new-chat {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
}

.okto-new-chat:hover,
.okto-panel__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.okto-roles {
  display: flex;
  gap: 0.3rem;
  padding: 0.55rem 0.7rem 0;
  flex-wrap: wrap;
}

.okto-role {
  border: 1px solid var(--okto-line);
  background: #fff;
  color: var(--okto-ink);
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
}

.okto-role.is-active {
  background: var(--okto-blue);
  border-color: var(--okto-blue);
  color: #fff;
}

.okto-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  padding: 0.4rem 0.7rem 0.25rem;
}

.okto-chip {
  border: 1px solid rgba(29, 111, 216, 0.12);
  background: var(--okto-blue-soft);
  color: #1a5fb3;
  border-radius: 999px;
  padding: 0.22rem 0.58rem;
  font-size: 0.68rem;
  font-family: inherit;
  cursor: pointer;
  text-align: right;
  line-height: 1.35;
}

.okto-chip:hover { background: #e2edfa; }

.okto-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f6f9fc;
  direction: ltr;
  min-height: 200px;
}

.okto-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: 90%;
}

.okto-msg-row--bot { align-self: flex-start; }
.okto-msg-row--user { align-self: flex-end; }
.okto-msg-row--operator {
  align-self: flex-start;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.okto-msg-row__op-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.okto-msg-row__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.okto-msg {
  padding: 0.55rem 0.72rem;
  border-radius: 13px;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  direction: rtl;
  text-align: right;
}

.okto-msg--bot {
  background: #fff;
  border: 1px solid var(--okto-line);
  color: var(--okto-ink);
  border-bottom-left-radius: 4px;
}

.okto-msg--operator {
  background: #ecfdf8;
  border: 1px solid rgba(13, 148, 136, 0.35);
  color: var(--okto-ink);
  border-bottom-left-radius: 4px;
}

.okto-msg--user {
  background: #1d6fd8;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.okto-live-banner {
  margin: 0 0.75rem 0.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.5;
  background: rgba(194, 65, 12, 0.08);
  color: #9a3412;
  border: 1px solid rgba(194, 65, 12, 0.2);
  direction: rtl;
  text-align: right;
}
.okto-live-banner--joined {
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.25);
}
.okto-live-banner--closed {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.25);
}
.okto-live-banner[hidden] { display: none !important; }

.okto-msg a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.okto-typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--okto-muted);
  padding: 0.15rem 0.35rem;
  direction: rtl;
}

.okto-typing__dots {
  display: inline-flex;
  gap: 3px;
}

.okto-typing__dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9bb0c5;
  animation: oktoDot 1.2s infinite ease-in-out;
}

.okto-typing__dots span:nth-child(2) { animation-delay: 0.15s; }
.okto-typing__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes oktoDot {
  0%, 80%, 100% { opacity: 0.35; transform: none; }
  40% { opacity: 1; transform: translateY(-2px); }
}

.okto-form {
  position: relative;
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.7rem 0.7rem;
  border-top: 1px solid var(--okto-line);
  background: #fff;
  direction: rtl;
  z-index: 3;
}

.okto-form.is-idle {
  box-shadow: inset 0 1px 0 rgba(29, 111, 216, 0.06);
}

.okto-form.is-idle input {
  animation: oktoInputGlow 2.4s ease-in-out infinite;
}

@keyframes oktoInputGlow {
  0%, 100% {
    border-color: rgba(29, 111, 216, 0.18);
    box-shadow: 0 0 0 0 rgba(29, 111, 216, 0);
  }
  50% {
    border-color: rgba(29, 111, 216, 0.55);
    box-shadow: 0 0 0 3px rgba(29, 111, 216, 0.12);
  }
}

.okto-form__hint {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1d6fd8;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  animation: oktoHintBob 1.8s ease-in-out infinite;
  box-shadow: 0 6px 16px rgba(29, 111, 216, 0.28);
}

.okto-form__hint::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #1d6fd8;
}

@keyframes oktoHintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

.okto-form.is-active .okto-form__hint,
.okto-form.has-typed .okto-form__hint {
  display: none;
}

.okto-chip {
  animation: oktoChipIn 0.45s ease both;
}

.okto-chip:nth-child(1) { animation-delay: 0.05s; }
.okto-chip:nth-child(2) { animation-delay: 0.12s; }
.okto-chip:nth-child(3) { animation-delay: 0.19s; }

@keyframes oktoChipIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.okto-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--okto-line);
  border-radius: 12px;
  padding: 0.62rem 0.75rem;
  font-family: inherit;
  font-size: 0.84rem;
  color: var(--okto-ink);
  background: #f8fbfe;
}

.okto-form input:focus {
  outline: 2px solid rgba(29, 111, 216, 0.22);
  border-color: var(--okto-blue);
  background: #fff;
}

.okto-form button[type="submit"] {
  border: none;
  border-radius: 12px;
  background: #1d6fd8;
  color: #fff;
  min-width: 64px;
  padding: 0 0.85rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.okto-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.okto-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.65rem;
  direction: rtl;
}

.okto-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.4rem 0.45rem;
  border-radius: 11px;
  border: 1px solid rgba(29, 111, 216, 0.14);
  background: #fff;
  color: #1557ad;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.okto-action:hover {
  border-color: rgba(29, 111, 216, 0.35);
  background: #f7fbff;
}

.okto-action span[dir="ltr"] {
  font-variant-numeric: tabular-nums;
}

/* Homepage: bare host, no outer marketing card */
.lp-okto-bare {
  margin: 0 0 0.75rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.lp-okto-inline-wrap {
  display: flex;
  flex-direction: column;
}

.lp-okto-inline,
.okto-inline-shell {
  display: flex;
  flex-direction: column;
}

.lp-okto-inline__loading {
  padding: 1rem;
  color: #6a7a8c;
  font-size: 0.84rem;
  background: #fff;
  border-radius: var(--okto-radius);
  border: 1px solid rgba(29, 111, 216, 0.12);
}

.okto-inline-shell .okto-card {
  min-height: 380px;
  max-height: 480px;
}

.okto-inline-shell .okto-messages {
  min-height: 180px;
}

.okto-inline-shell.is-chat-hidden,
.okto-actions.is-chat-hidden {
  display: none !important;
}

/* Homepage inline: never show ticket/FAQ/phone row under the box */
.lp-okto-inline-wrap > .okto-actions {
  display: none !important;
}

/* —— Landing hero (homepage) —— */
.lp-okto-inline-wrap--landing {
  gap: 0;
}

.okto-landing-host {
  width: 100%;
}

.okto-landing {
  --okto-mx: 0;
  --okto-my: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.35rem 1rem 1.15rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at calc(50% + (var(--okto-mx) * 18%)) calc(28% + (var(--okto-my) * 12%)), rgba(90, 180, 255, 0.42), transparent 42%),
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(160, 210, 255, 0.45), transparent 62%),
    linear-gradient(165deg, #dff0ff 0%, #eef6ff 38%, #f8fbff 72%, #ffffff 100%);
  border: 1px solid rgba(29, 111, 216, 0.12);
  box-shadow:
    0 18px 44px rgba(29, 111, 216, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
  isolation: isolate;
  animation: oktoLandingIn 0.45s ease both;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.okto-landing:hover {
  box-shadow:
    0 22px 52px rgba(29, 111, 216, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

@keyframes oktoLandingIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.okto-landing__glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    radial-gradient(circle at 30% 40%, rgba(64, 160, 255, 0.22), transparent 45%),
    radial-gradient(circle at 70% 30%, rgba(120, 200, 255, 0.2), transparent 42%);
  pointer-events: none;
  z-index: 0;
  transform: translate3d(calc(var(--okto-mx) * 12px), calc(var(--okto-my) * 10px), 0);
  transition: transform 0.05s linear;
}

.okto-landing__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(120, 190, 255, 0.15) 55%, transparent 70%);
  animation: oktoOrbDrift 9s ease-in-out infinite;
}

.okto-landing__orb--a {
  width: 72px;
  height: 72px;
  top: 12%;
  left: 8%;
  animation-duration: 8s;
}

.okto-landing__orb--b {
  width: 46px;
  height: 46px;
  top: 28%;
  right: 10%;
  animation-duration: 11s;
  animation-direction: reverse;
}

.okto-landing__orb--c {
  width: 34px;
  height: 34px;
  bottom: 22%;
  left: 18%;
  animation-duration: 7s;
}

@keyframes oktoOrbDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.45; }
  50% { transform: translate3d(10px, -14px, 0) scale(1.12); opacity: 0.75; }
}

.okto-landing__hero {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  min-height: 250px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 0.15rem;
  transform: translate3d(calc(var(--okto-mx) * 8px), calc(var(--okto-my) * 6px), 0);
  transition: transform 0.08s linear;
}

.okto-landing__mascot {
  position: relative;
  z-index: 1;
  width: min(236px, 58vw);
  height: auto;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(29, 111, 216, 0.28));
  animation: oktoMascotFloat 3.4s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
  transform-origin: 50% 70%;
}

@keyframes oktoMascotFloat {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-10px) rotate(1.2deg); }
}

.okto-landing__bubble {
  position: absolute;
  z-index: 2;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(29, 111, 216, 0.18);
  will-change: transform;
  backdrop-filter: blur(6px);
}

.okto-landing__bubble--ask {
  top: 16%;
  right: 0;
  max-width: 9.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(145deg, #2b7deb, #1d6fd8);
  color: #fff;
  font-size: 0.78rem;
  animation:
    oktoBubbleIn 0.55s ease 0.12s both,
    oktoBubbleFloatA 3.2s ease-in-out 0.6s infinite;
}

.okto-landing__bubble--traits {
  top: 10%;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem 0.55rem 0.85rem;
  border-radius: 16px 16px 16px 4px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d6fd8;
  font-size: 0.8rem;
  border: 1px solid rgba(29, 111, 216, 0.14);
  animation:
    oktoBubbleIn 0.55s ease 0.2s both,
    oktoBubbleFloatB 3.8s ease-in-out 0.4s infinite;
}

@keyframes oktoBubbleIn {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes oktoBubbleFloatA {
  0%, 100% { translate: 0 0; }
  50% { translate: -4px -10px; }
}

@keyframes oktoBubbleFloatB {
  0%, 100% { translate: 0 0; }
  50% { translate: 5px -12px; }
}

.okto-landing__spark {
  position: absolute;
  top: -0.45rem;
  right: -0.25rem;
  color: #1d6fd8;
  font-size: 0.95rem;
  animation: oktoSparkSpin 2.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes oktoSparkSpin {
  0%, 100% { transform: rotate(-8deg) scale(1); opacity: 0.85; }
  50% { transform: rotate(12deg) scale(1.18); opacity: 1; }
}

.okto-landing__composer {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  transform: translate3d(calc(var(--okto-mx) * 4px), calc(var(--okto-my) * 3px), 0);
  transition: transform 0.1s linear;
}

.okto-landing__field {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.4rem 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(29, 111, 216, 0.16);
  box-shadow: 0 12px 30px rgba(29, 111, 216, 0.12);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.okto-landing__field:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(29, 111, 216, 0.16);
}

.okto-landing__field:focus-within {
  border-color: rgba(29, 111, 216, 0.5);
  box-shadow: 0 14px 36px rgba(29, 111, 216, 0.2);
}

.okto-landing__field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--okto-ink);
  text-align: right;
  padding: 0.55rem 0.15rem;
}

.okto-landing__field input::placeholder {
  color: #8a9aab;
}

.okto-landing__send {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(180deg, #2b7deb, #1d6fd8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(29, 111, 216, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.okto-landing__send:hover,
.okto-landing__send:focus-visible {
  transform: translateY(-2px) scale(1.06);
  filter: brightness(1.06);
  box-shadow: 0 12px 24px rgba(29, 111, 216, 0.42);
  outline: none;
}

.okto-landing__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #7b8b9c;
  font-weight: 500;
}

.lp-okto-inline-wrap--landing.is-chat-mode .okto-inline-shell {
  animation: oktoChatReveal 0.35s ease both;
}

@keyframes oktoChatReveal {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .okto-landing__mascot,
  .okto-landing__bubble--ask,
  .okto-landing__bubble--traits,
  .okto-landing__spark,
  .okto-landing__orb {
    animation: none !important;
  }
}

/* Panel pages: keep FAB clear of mobile bottom nav */
body.app-ready .okto-fab {
  bottom: max(18px, env(safe-area-inset-bottom));
}

body.employee-sidebar-hover .okto-fab,
body:has(.bottom-nav) .okto-fab {
  bottom: max(76px, calc(env(safe-area-inset-bottom) + 64px));
}

@media (max-width: 900px) {
  .okto-fab {
    padding: 0.35rem;
    border-radius: 50%;
  }

  .okto-fab__label { display: none; }

  .okto-panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: min(78dvh, 620px);
    transform-origin: bottom center;
  }

  .okto-panel .okto-card {
    border-radius: 18px 18px 0 0;
  }

  .okto-actions {
    grid-template-columns: 1fr;
    padding: 0 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  }

  .okto-panel .okto-actions {
    background: #f6f9fc;
  }

  .okto-inline-shell .okto-card {
    min-height: 360px;
    max-height: 460px;
  }

  .okto-landing {
    padding: 1rem 0.75rem 0.95rem;
    border-radius: 22px;
  }

  .okto-landing__hero {
    min-height: 210px;
  }

  .okto-landing__mascot {
    width: min(200px, 62vw);
  }

  .okto-landing__bubble--ask {
    max-width: 7.8rem;
    font-size: 0.7rem;
    top: 14%;
  }

  .okto-landing__bubble--traits {
    font-size: 0.72rem;
    top: 8%;
  }

  .okto-landing__field {
    padding: 0.32rem 0.32rem 0.32rem 0.7rem;
  }

  .okto-landing__send {
    width: 42px;
    height: 42px;
  }
}

.okto-msg-tools {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  margin-inline-start: 2.1rem;
}

.okto-fb {
  border: 1px solid #d7e3f0;
  background: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  cursor: pointer;
  color: #456;
}

.okto-fb:hover { background: #eef5fc; }

.okto-suggested {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  margin-inline-start: 2.1rem;
}


/* Org/supplier landings: keep FAB above sticky CTA */
body.org-landing.has-org-sticky .okto-fab {
  bottom: max(9.25rem, calc(env(safe-area-inset-bottom) + 8.25rem));
}
@media (max-width: 900px) {
  body.org-landing.has-org-sticky .okto-fab {
    bottom: max(10.25rem, calc(env(safe-area-inset-bottom) + 9.25rem));
  }
}
