/* ============================================================
   WAManager.io — UI Override Stylesheet
   Focus: Clean glassmorphism header + compact premium dropdowns.
   Does NOT touch card layouts or page-level background colours.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   1. HEADER — Frosted white glassmorphism (no colour tint)
   ───────────────────────────────────────────────────────────── */
header.sticky {
  background: transparent !important;
  border-bottom: 1px solid transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-bottom 0.3s ease, box-shadow 0.3s ease;
}

header.sticky.header-scrolled {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.06) !important;
}

/* Ensure the nav inside the header is transparent so the
   glassmorphism on the header element shows through */
header.sticky nav,
header.sticky nav > div {
  background: transparent !important;
}

/* ─────────────────────────────────────────────────────────────
   2. DROPDOWN PANELS — Compact, professional
   ───────────────────────────────────────────────────────────── */

/* Wrapper that holds the trigger button + panel together */
.wam-popover-wrap {
  position: relative;
  display: inline-block;
}

/* The panel itself */
.wam-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 8px;
  z-index: 9999;
  font-family: 'Haskoy', system-ui, -apple-system, sans-serif;
}

/* Open state — simple display toggle */
.wam-panel.wam-open {
  display: block;
  animation: wam-drop 0.14s ease;
}

@keyframes wam-drop {
  from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}

/* Section label */
.wam-section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 10px 10px 4px;
  display: block;
}

/* Divider between sections */
.wam-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 4px 0;
}

/* Individual link row */
.wam-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
}
.wam-item:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.wam-item-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #111827;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wam-item-desc {
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.4;
}

/* Inline badge (e.g. "New") */
.wam-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: #2781f6;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
}

/* Chevron rotation on open */
.wam-trigger svg {
  transition: transform 0.18s ease;
}
.wam-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ─────────────────────────────────────────────────────────────
   3. GLOBAL POLISH
   ───────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}
::selection {
  background: rgba(39, 129, 246, 0.15);
  color: #111;
}

/* ============================================================
   4. HEADER ALIGNMENT FIX
   ============================================================ */
@media (min-width: 1024px) {
  header.sticky .justify-between {
    justify-content: flex-start !important;
  }
  header.sticky .justify-between > div:nth-child(2) {
    flex: 1;
    justify-content: space-between !important;
    margin-left: 2.5rem;
  }
}


/* ============================================================
   5. GLOBAL BRAND COLOR SWAP (Blue to WhatsApp Green)
   ============================================================ */

.text-woot, .text-n-woot-9, .text-blue-500, .text-blue-600, .text-n-blue-text, .text-n-blue-border { color: #157138 !important; }
.hover\:text-woot:hover, .hover\:text-n-woot-9:hover, .hover\:text-blue-500:hover, .hover\:text-blue-600:hover { color: #157138 !important; }

.bg-woot, .bg-n-woot-9, .bg-blue-500, .bg-blue-600, .navbar-register-link { background-color: #157138 !important; }
.hover\:bg-woot-dark:hover, .hover\:bg-woot-darker:hover, .hover\:bg-n-woot-10:hover, .hover\:bg-blue-600:hover, .hover\:bg-blue-700:hover, .navbar-register-link:hover { background-color: #0d4622 !important; }

.border-woot, .border-n-woot-9 { border-color: #157138 !important; }
.hover\:border-woot-dark:hover, .hover\:border-n-woot-10:hover { border-color: #0d4622 !important; }

.from-woot, .from-n-woot-9, .from-blue-500, .from-blue-600 { --tw-gradient-from: #157138 var(--tw-gradient-from-position) !important; --tw-gradient-to: rgba(21, 113, 56, 0) var(--tw-gradient-to-position) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
.to-woot-dark, .to-woot-darker, .to-n-woot-10, .to-woot, .to-blue-500, .to-blue-600, .to-blue-700 { --tw-gradient-to: #0d4622 var(--tw-gradient-to-position) !important; }


/* Logo Sizing */
header.sticky a[aria-label="Home"] div, header.sticky a[aria-label="Home"] img { height: 42px !important; width: auto !important; }

/* Footer Logo Sizing — distinct from header logo */
footer img[alt="WAManager"] { height: 40px !important; width: auto !important; object-fit: contain !important; }

/* ============================================================
   6. PRODUCT MEGA MENU — Full-width Chatwoot-style dropdown
   ============================================================ */

/* Mega panel: fixed full-width below header */
.wam-panel-mega {
  position: fixed !important;
  top: 0;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  transform: none !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12) !important;
  padding: 0 !important;
  z-index: 9998 !important;
}

/* Mega panel open animation */
.wam-panel-mega.wam-open {
  animation: wam-mega-drop 0.18s ease;
}

@keyframes wam-mega-drop {
  from { opacity: 0; transform: translateY(-8px) !important; }
  to   { opacity: 1; transform: translateY(0) !important; }
}

/* Inner container: centered, two-column grid */
.wam-mega-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 28px 32px 32px;
}

/* Individual column */
.wam-mega-col {
  display: flex;
  flex-direction: column;
}

/* Spacer between Products and Pricing in left column */
.wam-mega-spacer {
  height: 16px;
}

/* Mega menu section labels */
.wam-panel-mega .wam-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0 0 6px 0;
  margin-bottom: 2px;
}

/* Mega menu items — compact premium */
.wam-panel-mega .wam-mega-item {
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 1px;
}

.wam-panel-mega .wam-mega-item:hover {
  background: rgba(21, 113, 56, 0.06) !important;
}

.wam-panel-mega .wam-mega-item .wam-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.wam-panel-mega .wam-mega-item .wam-item-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
}

/* Mega menu badge — green */
.wam-panel-mega .wam-badge {
  background: #157138 !important;
}

/* ── Mobile: single-column stacked ── */
@media (max-width: 767px) {
  .wam-panel-mega {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    border-radius: 0 0 16px 16px !important;
  }

  .wam-mega-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 20px 24px;
  }

  .wam-mega-spacer {
    height: 10px;
  }
}

