/* =============================================================
   demo-banner.css - thanh "BẢN DEMO" chạy suốt phiên xem thử.

   Màu cam, cố ý không dùng cyan của sản phẩm: thanh này là lớp bọc bên ngoài,
   nhìn phải biết ngay nó không phải một phần của hệ thống.

   Chỉ bật khi <body> có class demo-session (js/demo-banner.js gắn vào). Lúc đó
   cả khung app tụt xuống đúng chiều cao thanh - các rule gốc đang khoá cứng
   100vh nên phải ghi đè từng cái ở đây, và file này nạp sau cùng.
   ============================================================= */

:root {
  --demo-banner-height: 0px;
}

body.demo-session {
  --demo-banner-height: 38px;
}

.demo-banner {
  display: none;
}

body.demo-session .demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  height: var(--demo-banner-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: linear-gradient(90deg, #ff8f00 0%, #ff6d00 100%);
  color: #2a1500;
  font-size: 0.8rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.demo-banner-label {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.demo-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}

.demo-banner-sep {
  opacity: 0.5;
}

.demo-banner-days b {
  font-weight: 800;
}

/* Chưa có hạn trên lead (lead cũ) thì giấu hẳn mệnh đề đếm ngược,
   phần còn lại của thanh vẫn giữ nguyên. */
.demo-banner-days.hidden,
.demo-banner-sep.hidden {
  display: none;
}

.demo-banner-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.demo-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  color: #2a1500;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease;
}

.demo-banner-btn:hover {
  background: rgba(0, 0, 0, 0.3);
}

.demo-banner-btn svg {
  width: 13px;
  height: 13px;
}

/* -------------------------------------------------------------
   Đẩy khung app xuống dưới thanh.

   Các rule gốc khoá cứng 100vh (layout.css: .app-container, .sidebar,
   .main-area, .content-container), nên phải trừ lại từng cái.
   ------------------------------------------------------------- */

body.demo-session .app-container {
  margin-top: var(--demo-banner-height);
  height: calc(100vh - var(--demo-banner-height));
}

body.demo-session .sidebar,
body.demo-session .main-area {
  height: calc(100vh - var(--demo-banner-height));
}

body.demo-session .content-container {
  height: calc(100vh - var(--demo-banner-height) - var(--header-height));
}

/* Ở chế độ drawer sidebar là position:fixed top:0, phải hạ xuống theo. */
@media (max-width: 1024px) {
  body.demo-session .sidebar {
    top: var(--demo-banner-height);
  }
}

/* -------------------------------------------------------------
   Responsive — thang breakpoint của css/responsive.css
   ------------------------------------------------------------- */

@media (max-width: 1024px) {
  .demo-banner-text .demo-banner-sample {
    display: none;
  }
  body.demo-session .demo-banner-text .demo-banner-sep {
    display: none;
  }
}

@media (max-width: 768px) {
  body.demo-session {
    --demo-banner-height: 34px;
  }
  body.demo-session .demo-banner {
    gap: 10px;
    padding: 0 10px;
  }
  .demo-banner-btn {
    padding: 4px 9px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  /* Ở khung này chỉ còn chỗ cho nhãn và các nút liên hệ. */
  .demo-banner-text {
    display: none;
  }
}
