/* LAB2HOME floating widgets — WhatsApp, Chat, Demo (PrimoSoft-style, brand colors) */

.l2h-float-rail {
  position: fixed;
  right: 6px;
  bottom: 110px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.l2h-float-rail__item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  color: inherit;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  line-height: normal;
}

.l2h-float-rail__label {
  display: flex;
  align-items: center;
  height: 40px;
  margin-top: 2px;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(135deg, #c9a227, #a8841a);
  color: #111;
  max-width: 0;
  padding: 0;
  overflow: hidden;
  transition: max-width 0.25s ease, padding 0.3s ease;
}

.l2h-float-rail__item:hover .l2h-float-rail__label,
.l2h-float-rail__item:focus-visible .l2h-float-rail__label {
  max-width: 160px;
  padding: 0 14px;
}

.l2h-float-rail__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.l2h-float-rail__icon--wa { color: #16a34a; }
.l2h-float-rail__icon--chat { color: #c9a227; }
.l2h-float-rail__icon--demo { color: #0ea5e9; }

/* Chat panel */
.l2h-chat-panel {
  position: fixed;
  right: 1rem;
  bottom: 6.5rem;
  z-index: 1045;
  width: min(100vw - 1.5rem, 340px);
  border-radius: 1rem;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.l2h-chat-panel[hidden] {
  display: none !important;
}

.l2h-chat-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  color: #f5f5f7;
}

.l2h-chat-panel__status {
  font-size: 0.75rem;
  color: #c9a227;
  margin-top: 0.15rem;
}

.l2h-chat-panel__close {
  border: 0;
  background: transparent;
  color: #a1a1a6;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}

.l2h-chat-panel__body {
  padding: 1rem;
  background: #161616;
}

.l2h-chat-panel__messages {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  background: #161616;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.l2h-chat-msg {
  display: flex;
}

.l2h-chat-msg--user {
  justify-content: flex-end;
}

.l2h-chat-msg--bot {
  justify-content: flex-start;
}

.l2h-chat-msg__bubble {
  max-width: 92%;
  border-radius: 0.85rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #f5f5f7;
}

.l2h-chat-msg--bot .l2h-chat-msg__bubble {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-bottom-left-radius: 0.3rem;
}

.l2h-chat-msg--user .l2h-chat-msg__bubble {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-right-radius: 0.3rem;
}

.l2h-chat-msg__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.l2h-chat-msg__link {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, #c9a227, #e0b93a);
  color: #111 !important;
}

.l2h-chat-typing {
  letter-spacing: 0.15em;
  opacity: 0.7;
}

.l2h-chat-panel__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 1rem 0.65rem;
  background: #161616;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.l2h-chat-chip {
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
  color: #e0b93a;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.l2h-chat-chip:hover {
  background: rgba(201, 162, 39, 0.18);
}

.l2h-chat-panel__form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  background: #111;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.l2h-chat-panel__form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1c1c1c;
  color: #f5f5f7;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  outline: none;
}

.l2h-chat-panel__form input:focus {
  border-color: rgba(201, 162, 39, 0.55);
}

.l2h-chat-panel__form button {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a227, #e0b93a);
  color: #111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.l2h-chat-panel__form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.l2h-chat-panel__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem 0.65rem;
  background: #0d0d0d;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.l2h-chat-panel__footer a {
  font-size: 0.72rem;
  color: rgba(245, 245, 247, 0.65);
  text-decoration: none;
}

.l2h-chat-panel__footer a:hover {
  color: #e0b93a;
}

.l2h-chat-bubble {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.22);
  color: #f5f5f7;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.l2h-chat-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.l2h-chat-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: #25d366;
  color: #fff !important;
}

.l2h-chat-action--alt {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7 !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.l2h-chat-action--gold {
  background: linear-gradient(135deg, #c9a227, #e0b93a);
  color: #111 !important;
}

/* Demo promo bar */
.l2h-demo-bar {
  position: fixed;
  bottom: 0;
  right: 4.5%;
  z-index: 1035;
  width: min(36.6vw, 440px);
  min-width: 290px;
  min-height: 78px;
  margin-bottom: 10px;
  padding: 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a1608 0%, #0f0f0f 55%, #121212 100%);
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.l2h-demo-bar.is-hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

.l2h-demo-bar__link {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: inherit;
  gap: 0.35rem;
}

.l2h-demo-bar__logo {
  min-width: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.l2h-demo-bar__logo img {
  width: auto;
  height: 48px;
  max-width: 72px;
  object-fit: contain;
  animation: l2hDemoPulse 6s ease-in-out infinite;
}

@keyframes l2hDemoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.l2h-demo-bar__body {
  padding: 4px 28px 4px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
}

.l2h-demo-bar__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e0b93a;
  line-height: 1.2;
}

.l2h-demo-bar__text {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: rgba(245, 245, 247, 0.72);
  line-height: 1.35;
}

.l2h-demo-bar__close {
  position: absolute;
  top: 4px;
  right: 6px;
  border: none;
  background: transparent;
  color: #a1a1a6;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  font-size: 1.25rem;
}

@media (max-width: 767.98px) {
  .l2h-demo-bar {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    min-width: 0;
  }

  .l2h-float-rail {
    bottom: 120px;
  }
}
