/* ====================================================================
   CHAMNHANH.NET - LANDING COMMUNITY ZALO & ROLE-BASED FEATURE STYLING
   Tuân thủ chuẩn mực B2B SaaS, responsive từ Mobile (320px) đến Desktop
   ==================================================================== */

/* --- 1. Top Navigation Zalo Pill Button --- */
.btn-gauth-zalo-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  height: 36px;
  border-radius: 999px;
  background: rgba(0, 104, 255, 0.09);
  border: 1px solid rgba(0, 104, 255, 0.3);
  color: #0068ff !important;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
  flex-shrink: 0;
}

.btn-gauth-zalo-nav:hover,
.btn-gauth-zalo-nav:focus-visible {
  background: #0068ff;
  border-color: #0068ff;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
  transform: translateY(-1px);
}

.btn-gauth-zalo-nav svg {
  flex-shrink: 0;
}

.zalo-nav-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.2;
}

[data-theme="dark"] .btn-gauth-zalo-nav {
  background: rgba(0, 104, 255, 0.18);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8 !important;
}

[data-theme="dark"] .btn-gauth-zalo-nav:hover {
  background: #0068ff;
  border-color: #0068ff;
  color: #ffffff !important;
}

/* --- 2. Role-Based Feature Matrix Section --- */
.landing-roles-section {
  width: 100%;
  max-width: 1240px;
  margin: 2.5rem auto 1.5rem;
  padding: 0 1rem;
}

.landing-roles-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 1.5rem;
}

.landing-roles-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 197, 223, 0.12);
  color: #00838f;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .landing-roles-badge {
  background: rgba(0, 197, 223, 0.2);
  color: #00e5ff;
}

.landing-roles-title {
  font-size: 1.55rem;
  font-weight: 850;
  color: var(--text-main, #082850);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.landing-roles-desc {
  font-size: 0.88rem;
  color: var(--text-secondary, #475569);
  line-height: 1.55;
  margin: 0;
}

.landing-role-tablist {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn-role-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 12px;
  background: var(--surface-subtle, #f1f5f9);
  border: 1.5px solid var(--border-color, #e2e8f0);
  color: var(--text-main, #0f172a);
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-role-tab:hover {
  border-color: var(--brand-cyan, #00c5df);
  background: var(--card-bg, #ffffff);
}

.btn-role-tab.active {
  background: var(--card-bg, #ffffff);
  border-color: var(--brand-cyan, #00c5df);
  color: #0284c7;
  box-shadow: 0 4px 14px rgba(0, 197, 223, 0.18);
}

[data-theme="dark"] .btn-role-tab {
  background: #0f1a36;
  border-color: #1e325c;
  color: #f8fafc;
}

[data-theme="dark"] .btn-role-tab.active {
  background: #152449;
  border-color: #00c5df;
  color: #38bdf8;
}

.landing-role-panels-wrap {
  position: relative;
}

.landing-role-panel {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.landing-role-panel.active {
  display: grid;
}

.role-feature-card,
#card-pillar-guided-solution {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-feature-card:hover,
#card-pillar-guided-solution:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 197, 223, 0.45);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .role-feature-card,
[data-theme="dark"] #card-pillar-guided-solution {
  background: #0f1a36;
  border-color: #1e325c;
}

.role-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.role-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box-indigo { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.icon-box-cyan { background: rgba(0, 197, 223, 0.12); color: #0097a7; }
.icon-box-emerald { background: rgba(16, 185, 129, 0.12); color: #059669; }
.icon-box-amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.icon-box-rose { background: rgba(244, 63, 94, 0.12); color: #e11d48; }
.icon-box-violet { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.icon-box-sky { background: rgba(14, 165, 233, 0.12); color: #0284c7; }

.role-card-tag {
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-subtle, #f1f5f9);
  color: var(--text-muted, #64748b);
}

.role-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main, #082850);
  margin: 0 0 0.45rem;
  line-height: 1.35;
}

.role-card-desc {
  font-size: 0.83rem;
  color: var(--text-secondary, #475569);
  line-height: 1.55;
  margin: 0 0 1rem;
}

.role-card-action {
  font-size: 0.8rem;
  font-weight: 750;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s ease;
}

.role-card-action:hover {
  color: #00c5df;
  text-decoration: underline;
}

/* --- 3. Dedicated Zalo Community Section --- */
.landing-zalo-section {
  width: 100%;
  max-width: 1240px;
  margin: 2.5rem auto 1.5rem;
  padding: 0 1rem;
}

.landing-zalo-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #071f40 0%, #0d325e 50%, #0050a4 100%);
  border: 1.5px solid rgba(0, 197, 223, 0.35);
  box-shadow: 0 14px 40px rgba(7, 31, 64, 0.25);
  padding: 2.2rem 2.5rem;
  color: #ffffff;
}

.landing-zalo-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 197, 223, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.zalo-community-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.zalo-left-content {
  display: flex;
  flex-direction: column;
}

.zalo-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 197, 223, 0.15);
  border: 1px solid rgba(0, 197, 223, 0.4);
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zalo-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: zalo-dot-pulse 1.8s infinite;
}

@keyframes zalo-dot-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.zalo-headline {
  font-size: 1.7rem;
  font-weight: 850;
  line-height: 1.28;
  color: #ffffff;
  margin: 0 0 0.65rem;
}

.zalo-headline span {
  color: #00e5ff;
}

.zalo-subtext {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 1.5rem;
}

.zalo-benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.zalo-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

.zalo-benefit-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 104, 255, 0.35);
  border: 1px solid rgba(0, 197, 223, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #00e5ff;
}

.zalo-benefit-title {
  font-size: 0.84rem;
  font-weight: 750;
  color: #ffffff;
  margin: 0 0 2px;
}

.zalo-benefit-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #94a3b8;
  margin: 0;
}

/* Zalo QR & Join Card */
.zalo-qr-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  color: #0f172a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.zalo-qr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #0068ff;
  background: rgba(0, 104, 255, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.zalo-qr-frame {
  position: relative;
  width: 175px;
  height: 175px;
  padding: 8px;
  background: #ffffff;
  border: 2px dashed #0068ff;
  border-radius: 14px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zalo-qr-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.zalo-qr-hint {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 1rem;
}

.btn-zalo-join-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: #0068ff;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 104, 255, 0.35);
  transition: all 0.2s ease;
}

.btn-zalo-join-now:hover,
.btn-zalo-join-now:focus-visible {
  background: #0052cc;
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.45);
  transform: translateY(-1px);
}

.zalo-shortlink-wrap {
  margin-top: 0.75rem;
  font-size: 0.74rem;
  color: #64748b;
}

.zalo-shortlink-copy {
  color: #0068ff;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.zalo-shortlink-copy:hover {
  text-decoration: underline;
}

.zalo-guarantee-pill {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #059669;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --- 4. Floating Zalo Quick Action Button --- */
.floating-zalo-pill {
  position: fixed;
  bottom: 76px;
  right: 20px;
  z-index: 1840;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: #0068ff;
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 104, 255, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease, bottom 0.25s ease;
}

.floating-zalo-pill:hover,
.floating-zalo-pill:focus-visible {
  background: #0056d6;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 104, 255, 0.48);
  color: #ffffff !important;
}

[data-theme="dark"] .floating-zalo-pill {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 104, 255, 0.5);
}

/* Zero Collision: Hide floating Zalo when support assistant drawer is open */
body.ag-support-drawer-open .floating-zalo-pill,
body.ag-support-drawer-open #btn-floating-zalo {
  display: none !important;
}

/* If support fab is suppressed, dismissed or hidden, drop Zalo pill gracefully to bottom: 20px */
body.ag-support-suppressed .floating-zalo-pill,
body:has(#ag-support-fab.ag-support-fab-hidden) .floating-zalo-pill,
body:has(#ag-support-fab.ag-support-fab-dismissed) .floating-zalo-pill,
body:has(#ag-support-fab[style*="display: none"]) .floating-zalo-pill {
  bottom: 20px;
}

.floating-zalo-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #0068ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.floating-zalo-pulse {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
}

/* --- 5. Responsive Styles --- */
@media (max-width: 1024px) {
  .landing-role-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .zalo-community-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .zalo-qr-card {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .landing-role-panel {
    grid-template-columns: 1fr;
  }
  .landing-zalo-card {
    padding: 1.5rem 1.15rem;
    border-radius: 18px;
  }
  .zalo-headline {
    font-size: 1.35rem;
  }
  .zalo-benefits-grid {
    grid-template-columns: 1fr;
  }
  .floating-zalo-pill {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    height: 40px;
    padding: 0 12px 0 8px;
    font-size: 0.78rem;
  }
  .floating-zalo-icon {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 380px) {
  .btn-role-tab {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  .landing-roles-title {
    font-size: 1.25rem;
  }
  .zalo-headline {
    font-size: 1.2rem;
  }
  .zalo-qr-frame {
    width: 145px;
    height: 145px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zalo-pulse-dot,
  .floating-zalo-pill {
    animation: none !important;
  }
  .role-feature-card,
  .btn-zalo-join-now,
  .btn-role-tab {
    transition: none !important;
  }
}
