/* Notification popup — F8BET blue theme (#0053DF / #2F6EFF) */

.notification-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 12px;
  background: rgba(0, 0, 0, 0.8);
  -webkit-font-smoothing: antialiased;
}

.notification-popup-panel {
  margin: auto;
  display: flex;
  width: 100%;
  max-width: 998px;
  flex-direction: column;
}

.notification-popup-panel.np-panel--hide-mobile {
  display: none;
}

.np-panel-header {
  position: relative;
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #2f6eff 0%, #0053df 55%, #4d8aff 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.np-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0 16px;
  color: #fff;
  cursor: pointer;
}

.np-close-btn svg {
  width: 14px;
  height: 14px;
}

.np-panel-body {
  display: flex;
  max-height: 70vh;
  width: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #0053df;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 18, 45, 0.25);
}

.np-sidebar {
  display: none;
  width: 25%;
  min-width: 160px;
  flex-shrink: 0;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid #0053df;
  background: #fff;
}

.np-sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.np-sidebar-item {
  width: 100%;
  border: 0;
  padding: 12px 20px;
  text-align: left;
  font-size: 14px;
  color: #0053df;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}

.np-sidebar-item:hover,
.np-sidebar-item.is-active {
  background: #0053df;
  color: #fff;
  font-weight: 600;
}

.np-main {
  width: 100%;
}

.np-detail {
  overflow-y: auto;
  background: #fff;
  max-height: 70vh;
}

.np-detail-media img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}

.np-detail-content {
  padding: 0 16px 16px;
  text-align: left;
  font-size: 16px;
  line-height: 1.55;
  color: #111;
}

/* Card nội dung — giống mẫu portal */
.np-detail-content .np-body {
  margin: 4px auto 16px;
  padding: 22px 20px 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 2px solid #b8d4ff;
  border-radius: 14px;
  box-shadow:
    0 0 22px rgba(51, 153, 255, 0.45),
    0 4px 12px rgba(51, 153, 255, 0.22);
  text-align: left;
  overflow: visible;
}

.np-detail-content .np-body > p {
  margin: 0 0 12px;
  color: #111;
  font-size: 16px;
  line-height: 1.55;
}

.np-detail-content .np-body > p:last-child {
  margin-bottom: 0;
}

/* Tiêu đề (p đầu không có bullet ✦) */
.np-detail-content .np-body > p:first-child:not(:has(> span:first-child)) {
  text-align: center;
  color: #7a9ad4;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0 0 16px;
  line-height: 1.35;
}

/* Fallback trình duyệt không hỗ trợ :has() */
@supports not selector(:has(*)) {
  .np-detail-content .np-body > p:first-child {
    text-align: center;
    color: #7a9ad4;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
  }
}

/* Bullet ✦ / ⭐ cùng hàng với text */
.np-detail-content .np-body > p > span:first-child {
  color: #0a52c9;
  font-weight: 700;
  margin-right: 4px;
  display: inline;
}

/* HTML cũ: ngôi sao + text bị bọc div lồng nhau */
.np-detail-content .np-body > div:not(.reward-wrap) {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.55;
}

.np-detail-content .np-body > div:not(.reward-wrap) > div {
  display: block;
  flex: 1;
  min-width: 0;
}

.np-detail-content .np-body strong,
.np-detail-content .np-body b {
  font-weight: 700;
  color: #111;
}

/* Mã KM thường nằm trong <b> */
.np-detail-content .np-body b {
  color: #0a52c9;
}

/* Brand / nhấn mạnh xanh */
.np-detail-content .np-body .np-code,
.np-detail-content .np-body .np-brand {
  color: #0a52c9;
  font-weight: 700;
}

/* Footer dòng cuối */
.np-detail-content .np-body > p:last-child {
  text-align: center;
  margin-top: 18px;
  color: #0a52c9;
  font-weight: 700;
}

.np-detail-content .np-body > p:last-child b,
.np-detail-content .np-body > p:last-child strong {
  color: #0a52c9;
  font-size: 17px;
}

.np-detail-content a:not(.reward-btn) {
  color: #0a52c9;
  text-decoration: none;
}

.np-detail-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px auto;
}

/* CTA gif căn giữa */
.np-detail-content .np-body > p:has(> a > img),
.np-detail-content .np-body > p:has(> img) {
  text-align: center;
  margin: 14px 0;
}

.np-detail-content .np-body > p:has(> a > img) img,
.np-detail-content .np-body a > img {
  margin: 0 auto;
  max-width: 220px;
}

.np-detail-content .reward-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 14px 0 6px;
}

/* Nút NHẬN THƯỞNG NGAY — gradient bóng kính + chữ vàng */
.np-detail-content .reward-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 235px;
  padding: 13px 30px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(
    180deg,
    #8ee7ff 0%,
    #45bfff 18%,
    #168cff 48%,
    #0568e8 72%,
    #0048bd 100%
  );
  color: #fff600 !important;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-decoration: none !important;
  text-shadow: 0 1px 1px #735d00, 0 0 7px rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 3px 5px rgba(255, 255, 255, 0.95),
    inset 0 -5px 7px rgba(0, 46, 145, 0.55),
    0 4px 0 #0047aa,
    0 8px 14px rgba(0, 73, 180, 0.38),
    0 0 15px rgba(49, 168, 255, 0.55);
  overflow: hidden;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.np-detail-content .reward-btn::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 8%;
  width: 84%;
  height: 42%;
  border-radius: 50px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}

.np-detail-content .reward-btn:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.06);
}

@media (max-width: 480px) {
  .np-detail-content .np-body {
    padding: 16px 14px 18px;
  }

  .np-detail-content .np-body > p:first-child:not(:has(> span:first-child)) {
    font-size: 17px;
  }

  .np-detail-content .reward-btn {
    min-width: 210px;
    padding: 11px 24px;
    font-size: 14px;
  }
}

.np-panel-footer {
  display: none;
  height: 30px;
  width: 100%;
  max-width: 998px;
  background: #0053df;
}

/* Mobile list card */
.np-mobile-list {
  width: 350px;
  max-width: 95vw;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 18, 45, 0.3);
}

.np-mobile-list-header {
  position: relative;
  background: linear-gradient(180deg, #2f6eff 0%, #0053df 100%);
  padding: 12px 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.np-mobile-list-header .np-close-btn {
  top: 50%;
  right: 16px;
  height: auto;
  padding: 4px;
  transform: translateY(-50%);
}

.np-mobile-list-header .np-close-btn svg {
  width: 16px;
  height: 16px;
}

.np-mobile-items {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 320px;
  min-height: 320px;
  overflow-y: auto;
  background: #fff;
}

.np-mobile-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid #e8f1ff;
  background: #fff;
  padding: 14px 16px;
  text-align: left;
  font-size: 15px;
  color: #0053df;
  cursor: pointer;
}

.np-mobile-item:last-child {
  border-bottom: 0;
}

.np-mobile-item:hover {
  background: #e7f4fe;
}

.np-mobile-item-left {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
}

.np-mobile-item-left svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #2f6eff;
}

.np-mobile-item > svg {
  width: 14px;
  height: 14px;
  margin-left: 8px;
  flex-shrink: 0;
  color: #2f6eff;
}

.np-mobile-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-mobile-close-bar {
  width: 100%;
  border: 0;
  background: linear-gradient(90deg, #2f6eff 0%, #0053df 100%);
  padding: 12px 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
}

.np-mobile-close-bar:hover {
  background: linear-gradient(90deg, #0053df 0%, #2f6eff 100%);
}

.popup-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #2f6eff #eef4ff;
}

.popup-scrollbar::-webkit-scrollbar {
  width: 8px;
  border-radius: 8px;
  background: #eef4ff;
}

.popup-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2f6eff 60%, #0053df 100%);
  border-radius: 8px;
}

.popup-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0053df 60%, #2f6eff 100%);
}

@media (min-width: 768px) {
  .np-mobile-list {
    display: none;
  }

  .notification-popup-panel,
  .notification-popup-panel.np-panel--hide-mobile {
    display: flex;
  }

  .np-panel-header {
    background: #0053df;
    font-size: 16px;
  }

  .np-panel-body {
    max-height: 560px;
    flex-direction: row;
    border-bottom: 0;
  }

  .np-sidebar {
    display: flex;
  }

  .np-main {
    width: 75%;
  }

  .np-detail {
    max-height: 526px;
  }

  .np-detail-content {
    padding: 0 32px 16px;
  }

  .np-panel-footer {
    display: block;
  }

  .popup-scrollbar {
    scrollbar-color: #0053df #eef4ff;
  }

  .popup-scrollbar::-webkit-scrollbar-thumb {
    background: #0053df;
  }

  .popup-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #003fad;
  }
}
