:root {
  --accent: #7e57c2;
  --user-bubble: #ede9fe;
  --bot-bubble: #f8fafc;
  --bg: rgba(10, 10, 12, 0.35);
  --card-bg: #ffffff;
  --muted: #6b7280;
  --radius: 14px;
  --transition: all 0.25s ease;
}

/* Overlay */
.lgl-office-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 99999;
  padding: 16px;
}

/* Popup card */
.lgl-office-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: popup-appear 0.25s ease;
}

@keyframes popup-appear {
  from {
    transform: scale(0.96) translateY(10px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Header */
.lgl-office-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lgl-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.lgl-office-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.lgl-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #555;
  transition: var(--transition);
}

.lgl-close:hover {
  color: var(--accent);
}

/* Chat content */
.lgl-office-body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 10px;
  overflow: hidden;
}

/* Conversation area */
.lgl-conversation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}

/* Bubble styling */
.lgl-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lgl-bot {
  align-self: flex-start;
  background: var(--bot-bubble);
  color: #0f172a;
  border-bottom-left-radius: 6px;
}

.lgl-user {
  align-self: flex-end;
  background: var(--user-bubble);
  color: #311b92;
  border-bottom-right-radius: 6px;
}

/* Options */
.lgl-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lgl-option {
  padding: 6px 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
}

.lgl-option:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Suggestions (cards) */
.lgl-suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.lgl-card {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: #fff;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.lgl-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.lgl-card h4 {
  font-size: 14px;
  margin: 6px 0 2px;
}

.lgl-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* Footer input */
.lgl-office-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lgl-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.lgl-input:focus {
  border-color: var(--accent);
}

.lgl-send {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  transition: var(--transition);
}

.lgl-send:hover {
  transform: scale(1.08);
}

/* Scrollbar */
.lgl-conversation::-webkit-scrollbar {
  width: 6px;
}

.lgl-conversation::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 720px) {
  .lgl-office-card {
    max-width: 90%;
  }

  .lgl-conversation {
    max-height: 65vh;
  }

  .lgl-bubble {
    font-size: 13px;
  }

  .lgl-office-header h2 {
    font-size: 15px;
  }
}

.lgl-card-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.lgl-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.lgl-card:hover {
  transform: scale(1.01);
}

.lgl-card img {
  width: 100%;
  height: auto;
  display: block;
}

.lgl-card-info {
  padding: 10px;
}

.lgl-contact-wrapper {
  margin-top: 12px;
}

.lgl-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 8px;
}

.lgl-contact-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.lgl-card-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.lgl-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

.lgl-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.lgl-card-info {
  padding: 12px;
}

.lgl-card-info h4 {
  margin: 0;
  font-size: 16px;
  color: #222;
}

.lgl-card-info .lgl-price {
  color: #28a745;
  font-weight: bold;
  margin-top: 4px;
}

.lgl-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.lgl-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
}

.lgl-btn-primary {
  background: linear-gradient(135deg, #007bff, #0056d2);
  color: #fff;
}

.lgl-btn-primary:hover {
  background: linear-gradient(135deg, #0056d2, #003c9e);
  transform: translateY(-2px);
}

.lgl-btn-outline {
  background: transparent;
  border: 1px solid #007bff;
  color: #007bff;
}

.lgl-btn-outline:hover {
  background: #007bff;
  color: #fff;
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lgl-btn-primary {
  background: linear-gradient(135deg, #007bff, #0056d2);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
}

.lgl-btn-primary:hover {
  background: linear-gradient(135deg, #0056d2, #003c9e);
  transform: translateY(-2px);
}

.lgl-btn-outline {
  background: transparent;
  border: 1px solid #3697ff;
  color: #007bff;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
}

.lgl-btn-outline:hover {
  background: #69b1fd;
  color: #fff;
  transform: translateY(-2px);
}

.lgl-contact-wrapper {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  z-index: 100000;
  /* đảm bảo trên layer khác */
}

.lgl-contact-wrapper input,
.lgl-contact-wrapper button {
  display: block !important;
}