.az2-chat-panel {
  position: fixed;
  right: 1.5rem;
  bottom: 6rem;
  z-index: 55;
  width: min(44rem, calc(100vw - 2rem));
  height: min(82vh, 52rem);
  max-height: calc(100vh - 2rem);
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.az2-chat-panel[hidden] {
  display: none;
}
.az2-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, hsl(262 80% 50%) 0%, hsl(262 75% 35%) 100%);
  color: #fff;
  cursor: move;
  user-select: none;
}
.az2-chat-toggle {
  background: linear-gradient(135deg, hsl(262 80% 50%) 0%, hsl(262 75% 35%) 100%);
}
.az2-chat-toggle:hover {
  filter: brightness(1.05);
}
.az2-chat-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.az2-chat-header-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.az2-chat-header-copy {
  min-width: 0;
}
.az2-chat-header-copy h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}
.az2-chat-header-copy p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  opacity: 0.94;
}
.az2-chat-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, hsl(262 80% 50%) 0%, hsl(262 75% 35%) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.az2-chat-close:hover {
  filter: brightness(1.08);
}
.az2-chat-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.az2-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.16rem;
  background: #fff7ed;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.az2-chat-message-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}
.az2-chat-message-row.is-user {
  justify-content: flex-end;
}
.az2-chat-bubble {
  display: inline-block;
  width: fit-content;
  max-width: 76%;
  border-radius: 1rem 1rem 1rem 0.38rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
  padding: 0.52rem 0.7rem;
  font-size: 0.875rem;
  line-height: 1.32;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 0.45rem 1.25rem rgba(15, 23, 42, 0.08);
}
.az2-chat-bubble.is-user {
  background: linear-gradient(135deg, hsl(262 80% 50%) 0%, hsl(262 75% 35%) 100%);
  border-color: hsl(262 75% 35%);
  color: #fff;
  border-radius: 1rem 1rem 0.38rem 1rem;
}
.az2-chat-bubble.az2-chat-bubble-results {
  max-width: 88%;
}
.az2-chat-document {
  white-space: normal;
  max-width: 34rem;
}
.az2-chat-document > :first-child {
  margin-top: 0;
}
.az2-chat-document > :last-child {
  margin-bottom: 0;
}
.az2-chat-document h1,
.az2-chat-document h2,
.az2-chat-document h3,
.az2-chat-document h4,
.az2-chat-document h5,
.az2-chat-document h6 {
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  line-height: 1.2;
}
.az2-chat-document p {
  margin: 0.18rem 0;
}
.az2-chat-document .az2-chat-inline-note {
  margin-top: 0.12rem;
  margin-bottom: 0;
}
.az2-chat-document .az2-chat-choice-card {
  margin: 0;
}
.az2-chat-product-list {
  margin-top: 0.38rem;
  display: grid;
  gap: 0.34rem;
  width: min(100%, 34rem);
}
.az2-chat-product-card {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.36rem;
  color: #0f172a;
  text-decoration: none;
}
.az2-chat-product-card:hover {
  border-color: #fb923c;
  background: #fffaf5;
}
.az2-chat-product-image {
  width: 3rem;
  height: 3rem;
  border-radius: 0.375rem;
  background: #f3f4f6;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}
.az2-chat-product-name {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}
.az2-chat-product-merchant {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.25;
}
.az2-chat-product-price {
  margin-left: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ea580c;
  white-space: nowrap;
}
.az2-chat-link-line {
  margin-top: 0.3rem;
}
.az2-chat-link-line a {
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
}
.az2-chat-link-line a:hover {
  text-decoration: underline;
}
.az2-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #6b7280;
  white-space: nowrap;
}
.az2-chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
}
.az2-chat-typing-dots span {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.35;
  animation: az2-chat-typing-dot 1s infinite ease-in-out;
}
.az2-chat-typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}
.az2-chat-typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes az2-chat-typing-dot {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 0.85;
    transform: translateY(-0.08rem);
  }
}
.az2-chat-input-wrap {
  border-top: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.75rem;
}
.az2-chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}
.az2-chat-input {
  width: 100%;
  height: 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.2;
  color: #0f172a;
  background: #fff;
}
.az2-chat-input:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: #2563eb;
}
.az2-chat-send {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, hsl(262 80% 50%) 0%, hsl(262 75% 35%) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.az2-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.az2-chat-send:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.az2-chat-choice-list {
  margin-top: 0.38rem;
  display: grid;
  gap: 0.34rem;
}
.az2-chat-choice-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.42rem;
  width: auto;
  max-width: 30rem;
}
.az2-chat-choice-list-results {
  width: min(100%, 34rem);
}
.az2-chat-choice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  padding: 0.42rem 0.72rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.az2-chat-choice-button:hover {
  background: #fff7ed;
}
.az2-chat-choice-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.44rem 0.54rem;
}
.az2-chat-choice-link {
  color: #0f172a;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
}
.az2-chat-choice-link:hover {
  text-decoration: underline;
}
.az2-chat-choice-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
}
.az2-chat-inline-note {
  margin-top: 0.14rem;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.24;
}
.az2-chat-status {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.az2-chat-sidepanel {
  position: absolute;
  inset: 4.5rem 0.75rem 0.75rem auto;
  width: min(22rem, calc(100% - 1.5rem));
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  padding: 0.9rem;
  z-index: 3;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.az2-chat-sidepanel[hidden] {
  display: none;
}
.az2-chat-sidepanel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.az2-chat-sidepanel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.az2-chat-sidepanel-form {
  display: grid;
  gap: 0.75rem;
}
.az2-chat-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #374151;
}
.az2-chat-field input[type="password"] {
  width: 100%;
  height: 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  font-size: 0.95rem;
  color: #0f172a;
  background: #fff;
}
.az2-chat-field-checkbox {
  grid-template-columns: auto 1fr;
  align-items: start;
}
.az2-chat-sidepanel-actions {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .az2-chat-panel {
    width: calc(100vw - 1rem);
    height: calc(100vh - 1rem);
    max-height: calc(100vh - 1rem);
    right: 0.5rem;
    bottom: 0.5rem;
  }
  .az2-chat-sidepanel {
    inset: auto 0.5rem 0.5rem 0.5rem;
    width: auto;
  }
}



/* EB2 compact chat pass */
.az2-chat-header {
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
}

.az2-chat-header-main {
  gap: 0.55rem;
}

.az2-chat-header-logo {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.45rem;
}

.az2-chat-header-copy h3 {
  font-size: 0.92rem;
  line-height: 1.15;
}

.az2-chat-header-copy p {
  margin-top: 0.1rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.az2-chat-close {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.45rem;
}

.az2-chat-messages {
  padding: 0.45rem;
  gap: 0.28rem;
}

.az2-chat-bubble {
  max-width: 76%;
  border-radius: 0.95rem 0.95rem 0.95rem 0.34rem;
  padding: 0.44rem 0.62rem;
  font-size: 0.82rem;
  line-height: 1.28;
}

.az2-chat-bubble.is-user {
  border-radius: 0.95rem 0.95rem 0.34rem 0.95rem;
}

.az2-chat-bubble.az2-chat-bubble-results {
  max-width: 88%;
}

.az2-chat-product-list {
  margin-top: 0.3rem;
  gap: 0.28rem;
}

.az2-chat-product-card {
  grid-template-columns: 2.6rem 1fr auto;
  gap: 0.42rem;
  padding: 0.35rem;
  border-radius: 0.45rem;
}

.az2-chat-product-image {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.32rem;
}

.az2-chat-product-name {
  font-size: 0.76rem;
  line-height: 1.18;
}

.az2-chat-product-merchant {
  margin-top: 0.05rem;
  font-size: 0.7rem;
  line-height: 1.15;
}

.az2-chat-product-price {
  font-size: 0.76rem;
}

.az2-chat-link-line {
  margin-top: 0.24rem;
}

.az2-chat-choice-list {
  margin-top: 0.3rem;
  gap: 0.28rem;
}

.az2-chat-choice-list-actions {
  gap: 0.34rem;
}

.az2-chat-choice-button {
  padding: 0.36rem 0.62rem;
  font-size: 0.76rem;
  line-height: 1.18;
}

.az2-chat-choice-card {
  padding: 0.38rem 0.48rem;
  border-radius: 0.45rem;
}

.az2-chat-choice-link,
.az2-chat-choice-title {
  font-size: 0.76rem;
  line-height: 1.18;
}

.az2-chat-inline-note {
  margin-top: 0.1rem;
  font-size: 0.7rem;
  line-height: 1.22;
}

@media (max-width: 900px) {
  .az2-chat-bubble {
    max-width: 92%;
  }

  .az2-chat-bubble.az2-chat-bubble-results {
    max-width: 94%;
  }

  .az2-chat-document,
  .az2-chat-product-list,
  .az2-chat-choice-list-results {
    max-width: 100%;
  }

  .az2-chat-choice-list-actions {
    max-width: 100%;
  }
}

.az2-chat-status {
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
}

.az2-chat-input-wrap {
  padding: 0.5rem;
}

.az2-chat-input-row {
  gap: 0.4rem;
}

.az2-chat-input,
.az2-chat-send {
  height: 2.25rem;
}

.az2-chat-input {
  border-radius: 0.45rem;
  padding: 0 0.58rem;
  font-size: 0.86rem;
}

.az2-chat-send {
  width: 2.25rem;
  border-radius: 0.45rem;
}

.az2-chat-sidepanel {
  inset: 3.65rem 0.55rem 0.55rem auto;
  padding: 0.7rem;
  border-radius: 0.65rem;
}

.az2-chat-sidepanel-form {
  gap: 0.55rem;
}

.az2-chat-field {
  gap: 0.25rem;
  font-size: 0.76rem;
}

.az2-chat-field input[type="password"] {
  height: 2.25rem;
  border-radius: 0.45rem;
  padding: 0 0.58rem;
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .az2-chat-messages {
    padding: 0.35rem;
  }

  .az2-chat-bubble {
    max-width: 92%;
  }

  .az2-chat-sidepanel {
    inset: auto 0.4rem 0.4rem 0.4rem;
  }
}





.az2-chat-recovery-warning {
  font-size: 0.82rem;
  color: #374151;
}

.az2-chat-recovery-card {
  margin-top: 0.5rem;
}

.az2-chat-recovery-big-list {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.az2-chat-recovery-word {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 0.45rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #111827;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
}

.az2-chat-recovery-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-start;
}

@media (min-width: 640px) {
  .az2-chat-recovery-big-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
