.assistant-launcher {
  position: fixed;
  inset-inline-end: 1.5rem;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.55rem 0.58rem 0.55rem 0.95rem;
  border: 1px solid rgba(217, 119, 6, 0.26);
  border-radius: 9999px;
  background: linear-gradient(135deg, #ffb223 0%, #f59e0b 72%, #ea8a06 100%);
  color: #111827;
  box-shadow:
    0 12px 28px rgba(217, 119, 6, 0.22),
    0 3px 9px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-family: Vazirmatn, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.assistant-launcher:hover {
  transform: translateY(-2px);
  color: #0f172a;
  box-shadow:
    0 16px 34px rgba(217, 119, 6, 0.28),
    0 5px 12px rgba(15, 23, 42, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.assistant-launcher:active {
  transform: translateY(0) scale(0.985);
  background: linear-gradient(135deg, #f59e0b 0%, #e88908 100%);
}

.assistant-launcher:focus-visible {
  outline: 3px solid rgba(255, 178, 35, 0.38);
  outline-offset: 3px;
}

.assistant-launcher__icon {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  place-items: center;
}

.assistant-launcher__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.assistant-launcher__label {
  white-space: nowrap;
}

.assistant-launcher__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.18rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: #b45309;
  box-shadow: 0 1px 4px rgba(120, 53, 15, 0.14);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

html[dir="rtl"] .assistant-launcher {
  padding-inline: 0.95rem 0.58rem;
}

@media (max-width: 640px) {
  .assistant-launcher {
    inset-inline-end: 0.9rem;
    bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
    min-height: 2.8rem;
    padding-block: 0.48rem;
    padding-inline-start: 0.78rem;
    font-size: 0.82rem;
  }

  .assistant-launcher__badge {
    min-height: 1.45rem;
    padding-inline: 0.4rem;
    font-size: 0.64rem;
  }
}

@media (prefers-color-scheme: dark) {
  .assistant-launcher {
    border-color: rgba(255, 178, 35, 0.34);
    background: linear-gradient(135deg, #f59e0b 0%, #e87908 68%, #d95f05 100%);
    color: #fffdf7;
    box-shadow:
      0 14px 32px rgba(234, 88, 12, 0.22),
      0 4px 12px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .assistant-launcher:hover {
    color: #ffffff;
    box-shadow:
      0 17px 38px rgba(234, 88, 12, 0.3),
      0 5px 14px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.26);
  }

  .assistant-launcher:active {
    background: linear-gradient(135deg, #e88908 0%, #c95205 100%);
  }

  .assistant-launcher__badge {
    border-color: rgba(255, 255, 255, 0.26);
    background: #fff7ed;
    color: #c2410c;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.24);
  }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-launcher {
    transition: none;
  }

  .assistant-launcher:hover,
  .assistant-launcher:active {
    transform: none;
  }
}

@media print {
  .assistant-launcher {
    display: none !important;
  }
}
