@import url("./chat-main.css");

.zalo-main .main-inner {
  width: min(100%, 1180px);
  padding-top: 112px;
  padding-bottom: 64px;
}

.zalo-hero {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--fs-line);
}

.zalo-hero .fs-title-lg {
  margin: 0;
}

.zalo-setup-shell {
  display: block;
}

.zalo-breadcrumb {
  margin-top: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fs-text-strong);
  text-decoration: none;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
}

.zalo-breadcrumb svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.zalo-platform-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--fs-line);
  box-shadow: var(--fs-shadow-card);
  display: flex;
  align-items: center;
  gap: 18px;
}

.zalo-connected-shell {
  display: none;
  width: min(100%, 1080px);
  margin: 0 auto;
}

.zalo-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fs-text-strong);
  text-decoration: none;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
}

.zalo-breadcrumb svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.zalo-platform-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--fs-line);
  box-shadow: var(--fs-shadow-card);
  display: flex;
  align-items: center;
  gap: 18px;
}

.zalo-platform-mark {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: rgba(0, 104, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.zalo-platform-mark svg {
  width: 38px;
  height: 38px;
}

.zalo-platform-copy {
  min-width: 0;
  flex: 1;
}

.zalo-platform-name {
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  color: var(--fs-text-strong);
}

.zalo-platform-desc {
  margin-top: 8px;
  font-size: 15px;
  line-height: 24px;
  color: var(--fs-text-muted);
}

.zalo-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zalo-connect-btn,
.zalo-disconnect-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--fs-line);
  background: #ffffff;
  color: var(--fs-text-strong);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
}

.zalo-connect-btn svg,
.zalo-disconnect-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.zalo-disconnect-btn {
  background: rgba(18, 20, 23, 0.04);
  display: none;
}

.zalo-connection-section {
  display: none;
  margin-top: 18px;
}

.zalo-connection-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--fs-line);
  box-shadow: var(--fs-shadow-card);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
}

.zalo-connection-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(18, 20, 23, 0.04);
  color: var(--fs-text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zalo-connection-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.zalo-connection-main {
  min-width: 0;
}

.zalo-connection-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.zalo-status-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zalo-status {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(155, 207, 108, 0.16);
  color: #4a7d20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.zalo-status svg,
.zalo-mini-disconnect-btn svg,
.zalo-agent-select-caret svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.zalo-mini-disconnect-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--fs-line);
  background: rgba(18, 20, 23, 0.04);
  color: var(--fs-text-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.zalo-user-label {
  font-size: 14px;
  line-height: 20px;
  color: var(--fs-text-soft);
}

.zalo-user-name {
  margin-top: 2px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  color: var(--fs-text-strong);
}

.zalo-agent-panel {
  margin-top: 16px;
}

.zalo-agent-label {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--fs-text-soft);
}

.zalo-agent-select-wrap {
  min-height: 88px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--fs-line);
  background: rgba(18, 20, 23, 0.03);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.zalo-agent-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(0, 104, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #1769ff;
  flex: 0 0 auto;
}

.zalo-agent-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.zalo-agent-value {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  color: var(--fs-text-strong);
}

.zalo-agent-meta {
  font-size: 12px;
  line-height: 16px;
  color: var(--fs-text-soft);
}

.zalo-agent-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.zalo-agent-select-caret {
  margin-left: auto;
  color: var(--fs-text-soft);
  flex: 0 0 auto;
}

body.is-connected .zalo-setup-shell {
  display: block;
}

body.is-connected .zalo-connected-shell {
  display: block;
}

body.is-connected .zalo-connect-btn {
  display: none;
}

body.is-connected .zalo-disconnect-btn {
  display: inline-flex;
}

body.is-connected .zalo-connection-section {
  display: block;
}

.zalo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 23, 0.46);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 80;
}

.zalo-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.zalo-modal {
  width: min(100%, 560px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--fs-line);
  box-shadow: 0 28px 70px rgba(18, 20, 23, 0.16);
  padding: 18px 18px 22px;
  position: relative;
}

.zalo-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 0;
  background: rgba(18, 20, 23, 0.05);
  color: var(--fs-text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zalo-modal-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.zalo-modal-body {
  padding: 18px 12px 8px;
  display: grid;
  justify-items: center;
  text-align: center;
}

.zalo-logo-word {
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #1769ff;
}

.zalo-title {
  margin-top: 14px;
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  color: #15294b;
}

.zalo-qr-card {
  margin-top: 28px;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(18, 20, 23, 0.05);
}

.zalo-qr-card svg {
  width: 88%;
  height: 88%;
  display: block;
}

.zalo-steps {
  max-width: 420px;
  margin: 24px 0 0;
  padding-left: 24px;
  color: #15294b;
  font-size: 16px;
  line-height: 1.75;
  text-align: left;
}

.zalo-steps li + li {
  margin-top: 8px;
}

.zalo-complete-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  padding: 0 24px;
  border-radius: 16px;
  border: 0;
  background: #1769ff;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .zalo-main .main-inner {
    padding-top: 44px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .zalo-platform-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .zalo-connect-btn,
  .zalo-disconnect-btn {
    width: 100%;
    justify-content: center;
  }

  .zalo-connection-top {
    flex-direction: column;
  }

  .zalo-status-wrap {
    width: 100%;
    flex-wrap: wrap;
  }
}
