/**
 * assets/css/bottom-bar.css
 * Mobile: floating bottom bar (1 nút chính + 3 icon).
 * Desktop: floating chat bubble góc phải dưới.
 */

/* ================= MOBILE BOTTOM BAR ================= */
.bottom-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  width: max-content;
  max-width: calc(100% - 32px);

  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bb-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--cream);
  color: var(--green-deep);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.bb-book:hover {
  transform: scale(1.02);
}

.bb-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(23, 64, 62, 0.6);
  color: #fff;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.bb-icon:hover {
  transform: scale(1.08);
  background: rgba(55, 45, 38, 0.8);
}

.bb-icon--text {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Body padding cho nội dung không bị bottom bar che */
@media (max-width: 1024px) {
  body {
    padding-bottom: 90px;
  }
}

/* ================= DESKTOP: ẩn bottom bar, hiện floating bubble ================= */
@media (min-width: 1025px) {
  .bottom-bar {
    display: none;
  }
}

/* ================= FLOATING CHAT BUBBLE (desktop only) ================= */
.float-chat {
  display: none;
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

@media (min-width: 1025px) {
  .float-chat {
    display: flex;
  }
}

.float-chat__menu {
  background: var(--cream);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(23, 59, 46, 0.12); /* Shadow nhẹ nhàng tạo độ nổi */
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  transform-origin: bottom right; /* Hiệu ứng mở ra từ vị trí của nút */
}

.float-chat.is-open .float-chat__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.float-chat__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--green-deep);
  text-decoration: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.float-chat__item:hover {
  opacity: 0.6; /* Khi hover chữ mờ đi một chút, giữ nguyên nền cream */
}

.float-chat__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.float-chat__trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--green-deep); /* Nền xanh đậm */
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(23, 59, 46, 0.3);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.float-chat__trigger:hover {
  transform: scale(1.06);
  background: #0f2a21; /* Tối màu hơn một chút khi di chuột vào */
}

/* ================= ẨN NAV CTA TRÊN MOBILE (đã có bottom bar) ================= */
@media (max-width: 1024px) {
  .site-header__cta {
    display: none;
  }
}
