/*
Theme Name: NXW Corporate
Theme URI: https://nxw.vn
Author: beONE Ecosystem
Author URI: https://beone.vn
Description: Official high-performance WordPress child theme for NXW - Next Wealth corporate portal & showroom, powered by Divi 5 & Divi AI.
Template: Divi
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: nxw
*/

/* Ensure all main sections and pages are visible */
body {
    visibility: visible !important;
    opacity: 1 !important;
}

section.page, section.page.on {
    display: block !important;
}

html.locked body > *:not(#login) {
    visibility: visible !important;
}

html.cms-wait body > *:not(#login) {
    visibility: visible !important;
}

/* Polylang Language Menu Links */
.lmenu a {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    color: #C9D6EC;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    box-sizing: border-box;
}
.lmenu a b {
    min-width: 34px;
    font-size: 12px;
    letter-spacing: .05em;
    color: #9DB0CC;
}
.lmenu a:hover {
    background: rgba(212,164,64,.14);
    color: #e9b54a;
}
.lmenu a.on {
    color: #e9b54a;
}
.lmenu a.on b {
    color: #e9b54a;
}

/* ==========================================================================
   DARK / LIGHT MODE CONTAINER SYNC FOR DIVI & WORDPRESS
   Khớp 100% màu sắc với bản mẫu gốc Shiny FinTech (NXW)
   Tuyệt đối không dùng ký tự gạch ngang dài
   ========================================================================== */

/* DARK MODE (Bản chuẩn gốc của Shiny App) */
html[data-mode="dark"] body,
html[data-mode="dark"] #page-container,
html[data-mode="dark"] #et-main-area,
html[data-mode="dark"] .et_pb_section,
html[data-mode="dark"] .et_pb_row,
html[data-mode="dark"] .sec,
html[data-mode="dark"] main,
html[data-mode="dark"] .site-main {
    background-color: #0a1530 !important;
    color: #dce4f2 !important;
}

html[data-mode="dark"] .et_pb_module_header,
html[data-mode="dark"] h1,
html[data-mode="dark"] h2,
html[data-mode="dark"] h3,
html[data-mode="dark"] h4 {
    color: #ffffff !important;
}

/* LIGHT MODE (Khi người dùng chủ động chọn trong Options) */
html[data-mode="light"] body,
html[data-mode="light"] #page-container,
html[data-mode="light"] #et-main-area,
html[data-mode="light"] .et_pb_section,
html[data-mode="light"] .et_pb_row,
html[data-mode="light"] .sec,
html[data-mode="light"] main,
html[data-mode="light"] .site-main {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

html[data-mode="light"] .et_pb_module_header,
html[data-mode="light"] h1,
html[data-mode="light"] h2,
html[data-mode="light"] h3,
html[data-mode="light"] h4 {
    color: #0f172a !important;
}


/* ========================================================
   NXW STEALTH IN-PAGE APP WORKSPACE MODAL
   ======================================================== */
.nxw-app-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 12, 26, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nxw-app-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.nxw-app-modal-header {
  height: 52px;
  background: #0a172e;
  border-bottom: 1px solid rgba(212, 164, 64, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.nxw-app-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nxw-app-modal-header-left img {
  height: 24px;
  width: auto;
}
.nxw-app-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.2);
}
.nxw-app-modal-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nxw-app-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.nxw-app-modal-badge .pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: nxwPulse 2s infinite;
}
@keyframes nxwPulse {
  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 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.nxw-app-modal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nxw-app-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.nxw-app-btn:hover {
  background: rgba(212, 164, 64, 0.2);
  border-color: #d4a440;
  color: #f6dc8c;
}
.nxw-app-btn-close {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-weight: 700;
}
.nxw-app-btn-close:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #ffffff;
}
.nxw-app-modal-body {
  flex: 1;
  position: relative;
  width: 100%;
  height: calc(100vh - 52px);
  background: #060d1a;
}
.nxw-app-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #060d1a;
  display: block;
}
.nxw-app-modal-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #071224;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  transition: opacity 0.3s;
}
.nxw-app-modal-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.nxw-app-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(212, 164, 64, 0.2);
  border-top-color: #d4a440;
  border-radius: 50%;
  animation: nxwSpin 0.9s linear infinite;
}
@keyframes nxwSpin {
  to { transform: rotate(360deg); }
}
.nxw-app-loader-text {
  color: #f6dc8c;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
