/* ARIDES_HERO_LUNA_CHAT_V1
   Shared ET / RU / EN geometry. The old hero calculator is replaced by a
   fixed-size Luna chat card; the floating moustached dispatcher uses the same
   conversation and canonical order draft. */

.arides-hero-dispatcher {
  width: 100%;
  max-width: 435px;
  height: 470px;
  min-height: 470px;
  position: relative;
}

.arides-hero-chat-card {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(199, 216, 206, .96);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #f8fbf9 100%);
  box-shadow: 0 20px 38px rgba(23,39,56,.095), 0 6px 15px rgba(23,39,56,.035), inset 0 1px 0 rgba(255,255,255,.9);
  color: #183329;
}

.arides-hero-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 68px;
  padding: 8px 12px 7px 10px;
  border-bottom: 1px solid #dfe9e3;
  background: linear-gradient(180deg, #fff, #f8fbf9);
}

.arides-hero-chat-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.arides-hero-chat-avatar {
  width: 48px;
  height: 52px;
  flex: 0 0 48px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 4px 5px rgba(20,55,39,.12));
}

.arides-hero-chat-title {
  min-width: 0;
}

.arides-hero-chat-title strong {
  display: block;
  overflow: hidden;
  color: #087a45;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arides-hero-chat-title span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #75867d;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arides-hero-chat-title span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #1fb66a;
  box-shadow: 0 0 0 3px rgba(31,182,106,.11);
  vertical-align: 1px;
}

.arides-hero-chat-new {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #d7e7df;
  border-radius: 10px;
  background: #f4faf7;
  color: #147246;
  font: 750 10px/1.15 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor: pointer;
}

.arides-hero-chat-new:hover {
  background: #eaf7f0;
}

.arides-hero-chat-log {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 13px 5px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #c8d7cf transparent;
}

.arides-hero-chat-msg {
  max-width: 91%;
  margin: 0 0 8px;
  padding: 8px 11px;
  border-radius: 14px;
  font: 13px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-weight: 520;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.arides-hero-chat-msg.assistant {
  padding: 8px 9px;
  border: 1px solid #e5eee9;
  border-radius: 13px 13px 13px 4px;
  background: transparent;
  color: #243b31;
  background-color: rgba(255,255,255,.78);
}

.arides-hero-chat-msg.assistant strong {
  color: #104b32;
  font-weight: 800;
}

.arides-hero-chat-msg.user {
  margin-left: auto;
  border-bottom-right-radius: 4px;
  background: #087a45;
  color: #fff;
}

.arides-hero-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px 1px;
}

.arides-hero-chat-chip {
  max-width: 100%;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #acd0bd;
  border-radius: 999px;
  background: #f9fcfa;
  color: #086f40;
  font: 750 10.5px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.arides-hero-chat-chip:hover:not(:disabled) {
  background: #edf8f2;
  border-color: #78b996;
  transform: translateY(-1px);
}

.arides-hero-chat-chip.is-primary {
  border-color: #087a45;
  background: #087a45;
  color: #fff;
}

.arides-hero-chat-chip.is-danger {
  border-color: #e6c1c1;
  background: #fff8f8;
  color: #a33a3a;
}

.arides-hero-chat-chip.is-install {
  border-color: #14563b;
  background: linear-gradient(145deg,#176642,#104d35);
  color: #fff;
  box-shadow: 0 4px 12px rgba(17,79,53,.16);
}

.arides-hero-chat-chip.is-history {
  border-color: #d2e2d9;
  background: #f5faf7;
  color: #315b47;
}

.arides-hero-chat-chip:disabled {
  cursor: default;
  opacity: .55;
}

.arides-hero-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 42px;
  gap: 6px;
  flex: 0 0 auto;
  margin: 5px 10px 0;
  padding: 7px;
  border: 1px solid #dce8e2;
  border-radius: 15px;
  background: #f7faf8;
}

.arides-hero-chat-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 0;
  outline: 0;
  padding: 7px 6px;
  background: transparent;
  color: #19382b;
  font: 12px/1.25 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.arides-hero-chat-input::placeholder {
  color: #8b9a92;
}

.arides-hero-chat-photo,
.arides-hero-chat-send {
  min-width: 0;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.arides-hero-chat-photo {
  background: #eaf4ef;
  color: #246b4a;
  font-size: 16px;
}

.arides-hero-chat-send {
  background: #087a45;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.arides-hero-chat-photo:disabled,
.arides-hero-chat-send:disabled {
  cursor: default;
  opacity: .55;
}

.arides-hero-chat-photo-input {
  display: none !important;
}

.arides-hero-chat-note {
  min-height: 25px;
  flex: 0 0 auto;
  padding: 5px 13px 4px;
  color: #809087;
  font: 9px/1.35 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.arides-hero-chat-note.is-processing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #087341;
  font-size: 14px;
  font-weight: 650;
}

.arides-hero-chat-note.is-processing::before {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid rgba(8,115,65,.22);
  border-top-color: #087341;
  border-radius: 50%;
  content: "";
  animation: arides-dispatcher-thinking .8s linear infinite;
}

@media(prefers-reduced-motion:reduce) {
  .arides-hero-chat-note.is-processing::before {
    animation: none;
  }
}

.arides-hero-chat-availability {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  box-sizing: border-box;
  flex: 0 0 38px;
  padding: 7px 12px;
  border-top: 1px solid #e4ece8;
  background: #f4faf7;
  color: #35604b;
  font: 750 10px/1.25 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.arides-hero-chat-availability-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #8fa39a;
  box-shadow: 0 0 0 3px rgba(97,123,110,.10);
}

.arides-hero-chat-availability[data-state="available"] {
  background: #effaf4;
  color: #1d7448;
}
.arides-hero-chat-availability[data-state="available"] .arides-hero-chat-availability-dot {
  background: #20b96a;
  box-shadow: 0 0 0 3px rgba(32,185,106,.12);
}

.arides-hero-chat-availability[data-state="busy"] {
  background: #fff8ed;
  color: #8a641c;
}
.arides-hero-chat-availability[data-state="busy"] .arides-hero-chat-availability-dot {
  background: #d99b2b;
  box-shadow: 0 0 0 3px rgba(217,155,43,.12);
}

.arides-hero-chat-availability[data-state="checking"] .arides-hero-chat-availability-dot {
  animation: arides-hero-availability-pulse 1s ease-in-out infinite;
}

@keyframes arides-hero-availability-pulse {
  50% { opacity: .35; transform: scale(.82); }
}

@media (min-width: 901px) {
  .hero-grid.hero-van-layout .hero-left {
    width: 430px !important;
  }
  .hero-grid.hero-van-layout .arides-hero-dispatcher {
    width: 100% !important;
    max-width: 435px !important;
  }
}

@media (min-width: 901px) and (max-width: 1250px) {
  .hero-grid.hero-van-layout .arides-hero-dispatcher {
    max-width: 410px !important;
  }
}

@media (max-width: 900px) {
  .arides-hero-dispatcher {
    max-width: none;
    height: 500px;
    min-height: 500px;
  }
  .arides-hero-chat-title strong { font-size: 14px; }
  .arides-hero-chat-title span { font-size: 10px; }
}

@media (max-width: 520px) {
  .arides-hero-dispatcher {
    height: 490px;
    min-height: 490px;
  }
  .arides-hero-chat-head { min-height: 62px; padding-left: 8px; }
  .arides-hero-chat-avatar { width: 43px; height: 47px; flex-basis: 43px; }
  .arides-hero-chat-title span { max-width: 180px; }
  .arides-hero-chat-log { padding-left: 10px; padding-right: 10px; }
  .arides-hero-chat-compose { margin-left: 8px; margin-right: 8px; }
}

/* ARIDES_HERO_CHAT_PREMIUM_V2
   Stronger desktop presence without changing the conversation or pricing flow. */

.arides-hero-chat-card {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(8, 122, 69, .28);
  background:
    radial-gradient(120% 95% at 100% 0%, rgba(28, 181, 105, .085) 0%, rgba(28, 181, 105, 0) 48%),
    linear-gradient(180deg, rgba(255,255,255,.998) 0%, rgba(249,253,251,.995) 58%, rgba(246,251,248,.998) 100%);
  box-shadow:
    0 28px 70px rgba(23,39,56,.15),
    0 10px 26px rgba(8,122,69,.09),
    inset 0 0 0 1px rgba(255,255,255,.88);
}

.arides-hero-chat-card::before {
  content: "";
  position: absolute;
  z-index: 5;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, rgba(8,122,69,.18), #13a860 50%, rgba(8,122,69,.18));
  box-shadow: 0 2px 10px rgba(19,168,96,.18);
  pointer-events: none;
}

.arides-hero-chat-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,0) 32%);
  pointer-events: none;
}

.arides-hero-chat-head {
  min-height: 78px;
  padding: 11px 13px 9px 11px;
  border-bottom: 1px solid rgba(8,122,69,.15);
  background:
    radial-gradient(90% 170% at 5% -40%, rgba(19,168,96,.13), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
  box-shadow: 0 5px 18px rgba(23,39,56,.035);
}

.arides-hero-chat-avatar {
  width: 52px;
  height: 57px;
  flex-basis: 52px;
  filter: drop-shadow(0 7px 8px rgba(20,55,39,.16));
}

.arides-hero-chat-title strong {
  font-size: 15.5px;
  letter-spacing: -.012em;
}

.arides-hero-chat-title span {
  display: -webkit-box;
  margin-top: 4px;
  color: #60766b;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.arides-hero-chat-title span::before {
  content: none;
  display: none;
}

.arides-hero-chat-new {
  border-color: rgba(8,122,69,.25);
  background: rgba(245,251,248,.94);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}

.arides-hero-chat-log {
  padding: 14px 13px 7px;
  background:
    radial-gradient(90% 55% at 100% 0%, rgba(19,168,96,.045), transparent 68%),
    linear-gradient(180deg, rgba(253,255,254,.58), rgba(248,252,250,.88));
}

.arides-hero-chat-msg.assistant {
  padding: 9px 11px;
  border: 1px solid rgba(218,230,224,.92);
  border-radius: 14px 14px 14px 5px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 5px 14px rgba(23,39,56,.04);
  color: #284238;
}

.arides-hero-chat-msg.user {
  background: linear-gradient(135deg, #0a8750, #087443);
  box-shadow: 0 6px 14px rgba(8,122,69,.14);
}

.arides-hero-chat-chip {
  border-color: rgba(78,160,116,.42);
  background: rgba(255,255,255,.92);
  box-shadow: 0 3px 9px rgba(23,39,56,.035);
}

.arides-hero-chat-chip.is-primary {
  background: linear-gradient(135deg, #0a8750, #087443);
  box-shadow: 0 7px 16px rgba(8,122,69,.16);
}

.arides-hero-chat-compose {
  margin: 7px 10px 0;
  border-color: rgba(8,122,69,.20);
  background: rgba(255,255,255,.96);
  box-shadow:
    0 8px 20px rgba(23,39,56,.055),
    inset 0 0 0 1px rgba(255,255,255,.84);
}

.arides-hero-chat-photo {
  border: 1px solid rgba(8,122,69,.13);
  background: #edf7f2;
}

.arides-hero-chat-send {
  background: linear-gradient(135deg, #0b8d54, #087443);
  box-shadow: 0 5px 12px rgba(8,122,69,.18);
}

.arides-hero-chat-note {
  padding-top: 7px;
  color: #6f8278;
}

.arides-hero-chat-availability {
  min-height: 42px;
  flex-basis: 42px;
  padding: 8px 13px;
  border-top: 1px solid rgba(8,122,69,.17);
  background: linear-gradient(180deg, #f2faf6, #eaf6f0);
  color: #315f49;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  font-size: 10.5px;
}

@media (min-width: 901px) {
  .hero-grid.hero-van-layout .arides-hero-dispatcher {
    height: var(--arides-hero-chat-height, 470px) !important;
    min-height: var(--arides-hero-chat-height, 470px) !important;
  }
}
