.netx-bot {
  --netx-bot-offset: 0px;
  position: fixed;
  z-index: 900;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(var(--netx-bot-offset) + max(12px, env(safe-area-inset-bottom)));
  width: min(360px, calc(100vw - 32px));
  font: 16px/1.45 system-ui, sans-serif;
  color: #1e2027;
  pointer-events: none;
  animation: netx-bot-enter .24s ease-out both;
}
.netx-bot[hidden], .netx-bot [hidden] { display: none !important; }
.netx-bot button, .netx-bot input, #netx-bot-panel { pointer-events: auto; }
.netx-bot button { font: inherit; cursor: pointer; }
.netx-bot .netx-bot-toggle, .netx-bot-form button {
  background: #9d2c22;
  border: 1px solid #9d2c22;
  color: #fff;
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 680;
}
.netx-bot .netx-bot-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  box-shadow: 0 5px 20px #32161236;
}
.netx-bot-toggle svg { flex: none; width: 21px; height: 21px; }
#netx-bot-panel {
  display: flex;
  flex-direction: column;
  max-height: min(565px, calc(100dvh - var(--netx-bot-offset) - 110px));
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e6dedb;
  border-radius: 18px;
  box-shadow: 0 18px 50px #22151230;
  overflow: auto;
}
#netx-bot-panel header { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 6px 17px; background: #faf4f2; border-bottom: 1px solid #f0e5e1; }
#netx-bot-panel h2 { margin: 0; font: 700 18px/1.3 system-ui, sans-serif; }
.netx-bot-close { color: #4f2925; border: 0; background: transparent; min-width: 40px; min-height: 40px; }
.netx-bot-log { overflow: auto; min-height: 70px; padding: 12px 16px 0; }
.netx-bot-log p { margin: 0 0 10px; white-space: pre-line; overflow-wrap: anywhere; }
.netx-bot-user { padding: 7px 10px; background: #f7f3f2; border-radius: 8px; }
.netx-bot-actions, .netx-bot-form { padding: 8px 16px 14px; }
.netx-bot-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.netx-bot-actions button { min-height: 40px; font-size: 14px; border: 1px solid #e4c1ba; background: #fff9f7; color: #82251c; border-radius: 999px; padding: 6px 10px; }
.netx-bot-form { border-top: 1px solid #e5e6e8; }
.netx-bot-form p { font-size: 13px; margin: 3px 0 8px; }
.netx-bot-form input { width: 100%; margin-bottom: 6px; font: inherit; }
.netx-bot :focus-visible { outline: 2px solid #4e302c; outline-offset: 2px; }
@keyframes netx-bot-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .netx-bot { animation: none; } }

.netx-bot { animation: none; }
.netx-bot .netx-bot-toggle {
  position: relative;
  isolation: isolate;
  gap: 10px;
  min-height: 56px;
  padding: 7px 18px 7px 8px;
  background: linear-gradient(118deg, #8c201c 0%, #af2f20 56%, #b93523 100%);
  border-color: #f9e0d5;
  box-shadow: 0 9px 26px #7a1e2145, inset 0 1px #ffffff42;
  letter-spacing: .01em;
  transition: box-shadow .2s ease, filter .2s ease;
  animation: netx-bot-pop .68s cubic-bezier(.2,.75,.25,1) both;
}
.netx-bot .netx-bot-toggle:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 28px #7a1e2160, inset 0 1px #ffffff42;
}
.netx-bot .netx-bot-toggle svg {
  width: 39px;
  height: 39px;
  padding: 7px;
  box-sizing: border-box;
  color: #96291f;
  background: #fff5ed;
  border-radius: 50%;
  animation: netx-bot-wave 1.05s ease-in-out .55s 3;
}
.netx-bot-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #d14d32;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  animation: netx-bot-halo 1.05s ease-out .55s 3;
}
.netx-bot-toggle[aria-expanded="true"]::after,
.netx-bot-toggle[aria-expanded="true"] svg { animation: none; }
#netx-bot-panel:not([hidden]) { animation: netx-bot-enter .22s ease-out both; }
@keyframes netx-bot-pop {
  0% { opacity: 0; transform: translateY(22px) scale(.82); }
  68% { opacity: 1; transform: translateY(-4px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes netx-bot-wave {
  0%, 55%, 100% { transform: rotate(0); }
  15% { transform: rotate(-13deg); }
  32% { transform: rotate(11deg); }
}
@keyframes netx-bot-halo {
  from { opacity: .6; transform: scale(1); }
  to { opacity: 0; transform: scale(1.16, 1.32); }
}
@media (prefers-reduced-motion: reduce) {
  .netx-bot .netx-bot-toggle, .netx-bot .netx-bot-toggle svg,
  .netx-bot-toggle::after, #netx-bot-panel:not([hidden]) { animation: none; }
}

.netx-bot-faq { padding: 0 16px 12px; }
.netx-bot-faq details { padding: 8px 0; border-top: 1px solid #ece5e2; font-size: 14px; }
.netx-bot-faq summary { cursor: pointer; font-weight: 650; }
.netx-bot-faq p { margin: 6px 0 0; white-space: pre-line; }

.netx-bot:has(.netx-bot-show-coverage) { width: min(510px, calc(100vw - 32px)); }
#netx-bot-panel.netx-bot-show-coverage {
  max-height: calc(100dvh - var(--netx-bot-offset) - 90px);
}
.netx-bot-show-coverage .netx-bot-log,
.netx-bot-show-coverage .netx-bot-actions,
.netx-bot-show-coverage .netx-bot-faq,
.netx-bot-show-coverage .netx-bot-form { display: none; }
.netx-bot-coverage { display: grid; gap: 8px; padding: 8px 10px 12px; min-height: 0; }
.netx-bot-coverage iframe {
  display: block;
  width: 100%;
  height: clamp(235px, calc(100dvh - var(--netx-bot-offset) - 225px), 590px);
  border: 1px solid #e6dedb;
  border-radius: 10px;
  background: #f3f8fb;
}
.netx-bot-coverage a { justify-self: start; font-size: 13px; color: #82251c; }
.netx-bot-back {
  justify-self: start;
  padding: 6px 10px;
  border: 1px solid #e4c1ba;
  border-radius: 8px;
  background: #fff9f7;
  color: #82251c;
}

.netx-bot-address { display: grid; gap: 7px; }
.netx-bot-address label { display: grid; gap: 2px; font-size: 14px; }
.netx-bot-address input { font: inherit; min-height: 38px; width: 100%; }
.netx-bot-address small { font-size: 12px; }
.netx-bot-address button, .netx-bot-open-order {
  justify-self: start;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #9d2c22;
  border-radius: 9px;
  background: #9d2c22;
  color: #fff;
}
.netx-bot-coverage-result { padding: 8px 10px; border-radius: 8px; background: #faf4f2; font-size: 14px; }
.netx-bot-coverage-result div { margin-top: 5px; }

.netx-bot-order { display: grid; gap: 7px; padding: 8px 0; }
.netx-bot-order label { display: grid; gap: 2px; font-size: 14px; }
.netx-bot-order input:not([type="checkbox"]) { font: inherit; min-height: 38px; width: 100%; }
.netx-bot-order-summary { padding: 8px 10px; background: #faf4f2; border-radius: 8px; margin: 0; font-size: 14px; }
.netx-bot-order .netx-bot-consent { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; }
.netx-bot-order button, .netx-bot-coverage-result button { display: block; padding: 6px 10px; margin-top: 4px; border-radius: 8px; }
.netx-bot-order-status { font-size: 14px; padding: 8px 10px; }
