/* ==========================================================================
   EasySell Explorer - AI Search Chat & Modern Buyer Radar Styles
   ========================================================================== */

body.es-modal-open {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

.es-radar-shell {
  max-width: 1280px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto 22px auto;
  padding: 0 24px;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

body.search-page .es-radar-shell {
  max-width: none;
  padding: 0;
  margin: 0 0 20px 0;
}

/* ── 1. Slim & Sleek AI Search Launch Strip ── */
.es-ai-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 13px 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 55%, #fffbeb 100%);
  border: 1.5px solid #fdba74;
  border-radius: 16px;
  box-shadow: 0 10px 26px -14px rgba(234, 88, 12, 0.36);
}

.es-ai-toolbar-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.es-ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff5722, #ea580c);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 6px 14px -6px rgba(234, 88, 12, 0.55);
  flex-shrink: 0;
}

.es-ai-status-text {
  font-size: 13.5px;
  color: #334155;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.es-ai-status-text strong {
  color: #0f172a;
  font-weight: 800;
}

.es-ai-quick-prompts {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.es-ai-quick-prompts::-webkit-scrollbar {
  display: none;
}

.es-ai-prompt-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.es-ai-prompt-pill:hover {
  border-color: #fb923c;
  color: #ea580c;
  background: #fff7ed;
  transform: translateY(-1px);
}

.es-ai-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.es-btn-geo,
.es-btn-ai,
.es-btn-radar,
.es-btn-active-radar,
.es-btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.es-btn-geo:hover,
.es-btn-ai:hover,
.es-btn-radar:hover,
.es-btn-active-radar:hover,
.es-btn-soft:hover {
  transform: translateY(-1px);
}

.es-btn-geo {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.es-btn-geo.is-active {
  background: #ecfdf5;
  color: #047857;
  border-color: #6ee7b7;
}

.es-btn-ai {
  background: linear-gradient(135deg, #ff5722 0%, #ea580c 100%);
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 13px;
  box-shadow: 0 10px 22px -10px rgba(234, 88, 12, 0.62);
}

.es-btn-radar {
  background: linear-gradient(135deg, #ff5722, #ea580c);
  color: #ffffff;
  box-shadow: 0 8px 18px -8px rgba(234, 88, 12, 0.55);
}

.es-btn-soft {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.es-btn-active-radar {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.es-radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: esRadarPulse 1.7s infinite;
  flex-shrink: 0;
}

@keyframes esRadarPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Inline summary banner when chat was used and minimized */
.es-ai-answer-box {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 10px 26px -16px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.es-ai-answer-copy {
  flex: 1 1 260px;
}

.es-ai-answer-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.es-ai-answer-sub {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.45;
}

.es-ai-answer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.es-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.es-ai-chip {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

/* ── 2. Structured AI Chat Experience (Desktop Dialog / Mobile Full Page) ── */
.es-chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.es-chat-overlay.is-open {
  display: flex;
}

.es-chat-shell {
  width: 100%;
  max-width: 860px;
  height: min(84vh, 740px);
  background: #f8fafc;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 32px 70px -15px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  animation: esChatSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes esChatSlideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.es-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.es-chat-header-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.es-chat-back-btn {
  display: none;
  align-items: center;
  gap: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: 11px;
  cursor: pointer;
  flex-shrink: 0;
}

.es-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, #0f172a, #ea580c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(234, 88, 12, 0.55);
}

.es-chat-title-wrap {
  min-width: 0;
}

.es-chat-title {
  font-size: 15.5px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.es-chat-subtitle {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.es-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.es-chat-header-radar {
  padding: 9.5px 12px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.es-chat-header-radar:hover {
  background: #ffedd5;
}

.es-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.es-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.es-chat-msg--user {
  align-items: flex-end;
}

.es-chat-user-bubble {
  max-width: 78%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.45);
}

.es-chat-msg--assistant {
  align-items: flex-start;
  width: 100%;
}

.es-chat-assistant-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.16);
}

.es-chat-assistant-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ea580c;
  margin-bottom: 8px;
}

.es-chat-reply-text {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.55;
}

.es-chat-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.es-chat-starter-btn {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9.5px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.es-chat-starter-btn:hover {
  background: #ffedd5;
  border-color: #fb923c;
  transform: translateY(-1px);
}

/* Loading typing dots */
.es-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.es-typing-dots {
  display: inline-flex;
  gap: 4px;
}

.es-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ff5722;
  animation: esChatBounce 1.1s infinite ease-in-out both;
}

.es-typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.es-typing-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes esChatBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.45; }
  40% { transform: scale(1); opacity: 1; }
}

.es-chat-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

/* Dedicated Section Alerte IA inside structured AI answers */
.es-chat-radar-section {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fefce8 100%);
  border: 1.5px solid #fdba74;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.es-chat-radar-section-copy {
  flex: 1 1 240px;
}

.es-chat-radar-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c2410c;
  margin-bottom: 3px;
}

.es-chat-radar-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.es-chat-radar-desc {
  font-size: 12px;
  color: #475569;
  margin-top: 3px;
  line-height: 1.4;
}

/* Persistent bottom Section Alerte IA strip above composer */
.es-chat-radar-footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  background: #fff7ed;
  border-top: 1px solid #fed7aa;
  flex-shrink: 0;
}

.es-chat-radar-footer-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #7c2d12;
  line-height: 1.35;
}

.es-chat-composer-wrap {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 16px;
  flex-shrink: 0;
}

.es-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.es-chat-geo-mini {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.es-chat-geo-mini.is-active {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.es-chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 15px;
  border-radius: 14px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.es-chat-input:focus {
  border-color: #ff5722;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.14);
}

.es-chat-send-btn {
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.es-chat-send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.es-chat-send-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* ── 3. Live Radar Request & Offers Panel ── */
.es-radar-tracker {
  margin-top: 14px;
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 36px -20px rgba(234, 88, 12, 0.3);
}

.es-radar-tracker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.es-radar-tracker-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.es-radar-tracker-meta {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
}

.es-btn-close-req {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.es-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.es-offer-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  overflow: hidden;
  background: #f8fafc;
}

.es-offer-top {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
}

.es-offer-img {
  width: 62px;
  height: 62px;
  border-radius: 11px;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
}

.es-offer-info {
  min-width: 0;
  flex: 1;
}

.es-offer-merchant {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.es-offer-dist {
  color: #047857;
  background: #ecfdf5;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.es-offer-prod {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 3px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.es-offer-price {
  font-size: 14px;
  font-weight: 800;
  color: #047857;
}

.es-offer-msg {
  padding: 0 12px 10px 12px;
  background: #ffffff;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

.es-offer-actions {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.es-offer-wa {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #16a34a;
  color: #ffffff;
  text-decoration: none;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}

.es-offer-map,
.es-offer-shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}

/* ── 4. Modern, Clean Buyer Alert Modal ── */
.es-radar-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.es-radar-modal-backdrop.is-open {
  display: flex;
}

.es-radar-modal {
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border-radius: 24px;
  padding: 0;
  box-shadow: 0 28px 65px -12px rgba(15, 23, 42, 0.42);
  max-height: 92vh;
  overflow-y: auto;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  animation: esChatSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.es-radar-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 80%);
  border-bottom: 1px solid #f1f5f9;
}

.es-radar-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ea580c;
  margin-bottom: 4px;
}

.es-radar-modal-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
}

.es-radar-modal-sub {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.45;
}

.es-radar-close-x {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  color: #334155;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.es-radar-modal-body {
  padding: 18px 22px 22px;
}

.es-radar-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.es-radar-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}

.es-radar-prefill-hint {
  display: none;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.es-radar-step-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 13px 14px;
  margin-bottom: 12px;
}

.es-radar-step-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 10px;
}

.es-form-group {
  margin-bottom: 10px;
}

.es-form-group:last-child {
  margin-bottom: 0;
}

.es-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.es-form-input,
.es-form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.es-form-textarea {
  min-height: 68px;
  resize: vertical;
  line-height: 1.45;
}

.es-form-input:focus,
.es-form-textarea:focus {
  outline: none;
  border-color: #ff5722;
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.12);
}

.es-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.es-radar-submit-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ff5722, #ea580c);
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 10px 24px -10px rgba(234, 88, 12, 0.65);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.es-radar-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.es-radar-submit-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.es-saved-buyer-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 11px 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #166534;
}

/* ── 5. Mobile Responsive Polish (Dedicated Full-Screen AI Page on <= 768px) ── */
@media (max-width: 768px) {
  .es-radar-shell {
    padding: 0 12px;
    margin-bottom: 12px;
  }

  body.search-page .es-radar-shell {
    padding: 0;
    margin-bottom: 12px;
  }

  .es-ai-toolbar {
    padding: 12px 12px;
    gap: 10px;
    border-radius: 16px;
    flex-wrap: wrap;
  }

  .es-ai-toolbar-left {
    flex: 1 1 0;
    min-width: 0;
    gap: 8px;
  }

  .es-ai-badge {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 10px;
  }

  .es-ai-status-text {
    font-size: 12.5px;
  }

  .es-ai-toolbar-actions {
    width: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .es-ai-toolbar-actions .es-btn-ai {
    min-width: 0;
    padding: 9px 13px;
    font-size: 12.5px;
    border-radius: 11px;
  }

  .es-ai-toolbar-actions .es-btn-active-radar {
    flex-basis: 100%;
    padding: 6px 10px;
    font-size: 11.5px;
  }

  /* AI Chat behaves as a full dedicated mobile page */
  .es-chat-overlay {
    padding: 0;
    background: #f8fafc;
  }

  .es-chat-shell {
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .es-chat-header {
    padding: 12px 14px;
  }

  .es-chat-back-btn {
    display: inline-flex;
  }

  .es-chat-avatar,
  #esChatCloseBtn {
    display: none;
  }

  .es-chat-messages {
    padding: 14px;
    gap: 14px;
  }

  .es-chat-user-bubble {
    max-width: 88%;
  }

  .es-chat-products-grid {
    grid-template-columns: 1fr;
  }

  .es-chat-radar-footer-cta {
    padding: 10px 14px;
  }

  .es-chat-composer-wrap {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .es-form-row-2 {
    grid-template-columns: 1fr;
  }

  .es-radar-modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .es-radar-modal {
    border-radius: 22px 22px 16px 16px;
    max-height: 92dvh;
  }

  .es-radar-modal-head {
    padding: 16px 16px 14px;
  }

  .es-radar-modal-body {
    padding: 14px 16px 18px;
  }
}
