/* ==========================================================================
   WP-KORE CUBE CSS — KORE_NAV CUSTOM ELEMENT (Atomic Component)
   Single Source of Truth: go-admin/src/Elements/GoAdmin_Nav/default.css
   Covers: .kore-nav, .kore-nav__inner, .kore-nav__dropdown, popover sheets
   ========================================================================== */

/* ═══ KORE_NAV CUSTOM ELEMENT & BOTTOM SHEET DRAWER ═══ */

.kore-nav {
  --local-bg: transparent;
  --local-border: none;
  --local-radius: var(--radius-control);
  --local-shadow: none;
  --local-color: var(--text-main);
  --local-intent-color: var(--brand);

  position: relative;
  box-sizing: border-box;
  background-color: var(--local-bg);
  border: var(--local-border);
  border-radius: var(--local-radius);
  box-shadow: var(--local-shadow);
  color: var(--local-color);
  transition: background-color var(--duration-fast, 0.2s) var(--ease-standard, ease),
              border-color var(--duration-fast, 0.2s) var(--ease-standard, ease),
              box-shadow var(--duration-fast, 0.2s) var(--ease-standard, ease);
}

/* Color Intent Variants */
.kore-nav[data-intent="surface"] {
  --local-bg: var(--surface);
  --local-border: var(--border-width) solid var(--surface-border);
  --local-shadow: var(--shadow-sm);
}
.kore-nav[data-intent="transparent"] {
  --local-bg: transparent;
  --local-border: none;
  --local-shadow: none;
}
.kore-nav[data-intent="brand"] {
  --local-bg: var(--surface);
  --local-border: var(--border-width) solid var(--brand);
  --local-shadow: var(--shadow-sm);
}
.kore-nav[data-intent="canvas"] {
  --local-bg: var(--canvas);
  --local-border: var(--border-width) solid var(--surface-border);
  --local-shadow: none;
}
.kore-nav[data-intent="inverse"] {
  --local-bg: oklch(0.18 0.01 260);
  --local-color: oklch(0.98 0 0);
  --local-border: var(--border-width) solid oklch(1 0 0 / 0.12);
  --local-shadow: var(--shadow-md);
}

/* Inner Navigation Bar Layout */
.kore-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  box-sizing: border-box;
  max-width: 100%;
}

/* Desktop Navigation List */
.kore-nav__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-3xs);
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.kore-nav__list::-webkit-scrollbar {
  display: none;
}
/* Un dropdown es `position: absolute` y DESCENDIENTE de esta lista: con
   `overflow-x: auto` la lista actúa como caja de recorte y el panel nunca se
   pinta (hover → display:flex, pero clipped a la altura del trigger → invisible).
   Solo las listas SIN dropdown conservan el scroll horizontal. */
.kore-nav__list:has(.kore-nav__dropdown) {
  overflow-x: visible;
  overflow-y: visible;
}
.kore-nav__item {
  position: relative;
}
.kore-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-medium, 500);
  line-height: 1.2;
  color: var(--text-main, inherit);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-control);
  position: relative;
  transition: color var(--duration-fast, 0.2s) var(--ease-standard, ease),
              background-color var(--duration-fast, 0.2s) var(--ease-standard, ease),
              transform var(--duration-fast, 0.2s) var(--ease-standard, ease);
}
.kore-nav__link:hover {
  background-color: var(--surface-subtle);
  color: var(--brand);
}
.kore-nav__link.is-active,
.kore-nav__link[aria-current="page"] {
  color: var(--brand);
  font-weight: var(--font-weight-semibold);
  background-color: var(--surface-subtle);
}
.kore-nav__link.is-active::after,
.kore-nav__link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.25rem;
  height: 0.25rem;
  border-radius: var(--radius-full);
  background-color: var(--brand);
}

/* Nav Capsule Variant */
:is(.nav-capsule, .kore-nav--capsule, [data-variant="capsule"]) .kore-nav__list {
  background-color: oklch(100% 0 0 / 6%);
  border: 1px solid var(--border-glass, oklch(100% 0 0 / 12%));
  border-radius: var(--radius-brand, 0.75rem);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-3xs, 0.25rem) var(--space-xs, 0.75rem);
  gap: var(--space-3xs, 0.25rem);
  box-shadow: none;
  align-items: center;
}

:is(.nav-capsule, .kore-nav--capsule, [data-variant="capsule"]) .kore-nav__link {
  font-family: var(--font-display, inherit);
  font-size: var(--font-size-sm, 0.8125rem);
  font-weight: var(--font-weight-bold, 700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-on-dark, var(--text-main));
  border-radius: var(--radius-control, 0.375rem);
  padding: var(--space-2xs, 0.375rem) var(--space-xs, 0.75rem);
  line-height: 1;
}

:is(.nav-capsule, .kore-nav--capsule, [data-variant="capsule"]) .kore-nav__link:hover {
  background-color: oklch(100% 0 0 / 10%);
  color: var(--white);
  transform: translateY(-1px);
}

:is(.nav-capsule, .kore-nav--capsule, [data-variant="capsule"]) .kore-nav__link.is-active,
:is(.nav-capsule, .kore-nav--capsule, [data-variant="capsule"]) .kore-nav__link[aria-current="page"] {
  color: var(--white) !important;
  background-color: oklch(100% 0 0 / 8%);
  border: 1px solid oklch(100% 0 0 / 12%);
  box-shadow: none;
  font-weight: var(--font-weight-bold);
}
:is(.nav-capsule, .kore-nav--capsule, [data-variant="capsule"]) .kore-nav__link.is-active::after,
:is(.nav-capsule, .kore-nav--capsule, [data-variant="capsule"]) .kore-nav__link[aria-current="page"]::after {
  display: none !important;
}
.kore-nav__link:focus-visible {
  outline: var(--border-width) solid var(--local-intent-color, var(--brand));
  outline-offset: 0.125rem;
  border-radius: var(--radius-control);
}
.kore-nav__link:active {
  transform: scale(0.97);
}
.kore-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.kore-nav__item.has-dropdown:hover > .kore-nav__link .kore-chevron,
.kore-nav__item.has-dropdown:focus-within > .kore-nav__link .kore-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.kore-nav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: max-content;
  min-width: 12rem;
  max-width: 20rem;
  padding: var(--space-2xs);
  list-style: none;
  z-index: 100;
  flex-direction: column;
  gap: var(--space-3xs);
  background-color: var(--surface);
  border: var(--border-width) solid var(--surface-border);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kore-nav__dropdown::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: -0.5rem;
  right: -0.5rem;
  height: 1rem;
  background: transparent;
}
.kore-nav__item.has-dropdown:hover > .kore-nav__dropdown,
.kore-nav__item.has-dropdown:focus-within > .kore-nav__dropdown {
  display: flex;
  animation: gsNavDropdownFade 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes gsNavDropdownFade {
  from { opacity: 0; transform: translateY(0.375rem); }
  to   { opacity: 1; transform: translateY(0); }
}
.kore-nav__dropdown-link {
  display: block;
  padding: var(--space-2xs) var(--space-xs);
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--text-main) !important;
  text-decoration: none;
  border-radius: var(--radius-control);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.kore-nav__dropdown-link:hover {
  background-color: var(--surface-subtle) !important;
  color: var(--brand) !important;
}
.kore-nav__dropdown-link:active {
  transform: scale(0.97);
}
.kore-nav__dropdown .kore-nav__dropdown {
  top: -0.5rem;
  left: 100%;
  margin-left: var(--space-2xs);
}
.kore-nav__dropdown .kore-nav__dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.75rem;
  width: 0.75rem;
  z-index: -1;
}
.kore-nav__dropdown.is-right {
  left: auto;
  right: 0;
}
.kore-nav__dropdown .kore-nav__dropdown.is-right {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: var(--space-2xs);
}
.kore-nav__dropdown .kore-nav__dropdown.is-right::before {
  left: auto;
  right: -0.75rem;
}

/* Hamburger Toggle Button — Frosted Companion Card */
.kore-nav__toggle {
  display: none;
  background-color: oklch(100% 0 0 / 10%);
  border: 1px solid var(--border-glass, oklch(100% 0 0 / 18%));
  border-radius: var(--radius-control);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  padding: 0;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  color: var(--white);
  position: relative;
  z-index: 101;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background-color var(--duration-fast, 0.2s) var(--ease-standard, ease),
              border-color var(--duration-fast, 0.2s) var(--ease-standard, ease),
              transform 120ms cubic-bezier(0.2, 0, 0, 1);
}
.kore-nav__toggle:hover {
  background-color: oklch(100% 0 0 / 18%);
  border-color: oklch(100% 0 0 / 28%);
  transform: translateY(-1px);
}
.kore-nav__toggle:active {
  transform: scale(0.92);
}
.kore-burger-icon {
  width: 1.125rem;
  height: 0.8125rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform var(--duration-fast, 0.2s) var(--ease-standard, ease);
}
.kore-burger-icon span {
  display: block;
  width: 100%;
  height: 0.125rem;
  background-color: var(--white);
  border-radius: var(--radius-full);
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.kore-nav__toggle:hover .kore-burger-icon span:nth-child(1) {
  transform: translateY(-0.0625rem);
}
.kore-nav__toggle:hover .kore-burger-icon span:nth-child(2) {
  transform: scaleX(0.75);
  transform-origin: right center;
}
.kore-nav__toggle:hover .kore-burger-icon span:nth-child(3) {
  transform: translateY(0.0625rem);
}

/* Transform toggle button to clean mathematical X when popover is open */
.kore-nav__toggle[aria-expanded="true"] .kore-burger-icon span:nth-child(1),
:has(.kore-nav__sheet-container:popover-open) .kore-nav__toggle .kore-burger-icon span:nth-child(1) {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) rotate(45deg);
}
.kore-nav__toggle[aria-expanded="true"] .kore-burger-icon span:nth-child(2),
:has(.kore-nav__sheet-container:popover-open) .kore-nav__toggle .kore-burger-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.kore-nav__toggle[aria-expanded="true"] .kore-burger-icon span:nth-child(3),
:has(.kore-nav__sheet-container:popover-open) .kore-nav__toggle .kore-burger-icon span:nth-child(3) {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) rotate(-45deg);
}
.kore-nav__toggle[aria-expanded="true"],
:has(.kore-nav__sheet-container:popover-open) .kore-nav__toggle {
  background-color: oklch(100% 0 0 / 12%);
  border-color: oklch(100% 0 0 / 18%);
}

/* Mobile Drawer Popover (Docked Bottom Sheet Archetype) */
.kore-nav__sheet-container {
  position: fixed;
  top: var(--header-height, 4.25rem);
  left: 0;
  right: 0;
  bottom: 0;
  inset: var(--header-height, 4.25rem) 0 0 0;
  width: 100vw;
  height: calc(100dvh - var(--header-height, 4.25rem));
  max-width: 100vw;
  max-height: calc(100dvh - var(--header-height, 4.25rem));
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: hidden;
  z-index: var(--z-modal, 1000);
}
.kore-nav__sheet-container::backdrop {
  display: none !important;
  background: transparent !important;
}
.kore-nav__sheet-container:not(:popover-open) {
  display: none !important;
  pointer-events: none !important;
}
.kore-nav__sheet-backdrop {
  position: absolute;
  inset: 0;
  background-color: oklch(0% 0 0 / 45%);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  cursor: pointer;
}
.kore-nav__sheet-scroller {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border-top-left-radius: var(--radius-overlay, 1.25rem);
  border-top-right-radius: var(--radius-overlay, 1.25rem);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: var(--border-width, 1px) solid oklch(21% 0.02 var(--dark-h, 140) / 10%);
  box-shadow: 0 -0.5rem 2rem oklch(0% 0 0 / 18%), var(--shadow-lg);
  max-height: 85vh;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.kore-nav__sheet-container:popover-open .kore-nav__sheet-scroller {
  transform: translateY(0);
}
.kore-nav__sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
}
.kore-nav__sheet-header {
  display: none !important;
}
.kore-nav__sheet-title {
  display: none;
}
.kore-nav__sheet-close {
  display: none;
}
.kore-nav__sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  flex: 1;
}
.kore-nav__sheet-item {
  width: 100%;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.kore-nav__sheet-container:popover-open .kore-nav__sheet-item {
  opacity: 1;
  transform: translateY(0);
}

/* Hairline border for regular rows */
.kore-nav__sheet-item:not(:last-child):not(.is-cta) {
  border-bottom: var(--border-width, 1px) solid oklch(21% 0.02 var(--dark-h, 140) / 10%);
}

:is(.kore-nav__sheet-link, .kore-nav__sheet-row) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.125rem;
  padding: 0 var(--space-xs);
  background: none;
  border: none;
  color: var(--text-main);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-normal, 0.03em);
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  box-sizing: border-box;
  transition: background-color var(--duration-fast, 0.2s) ease, color var(--duration-fast, 0.2s) ease;
}

/* Right Chevron on standard rows */
.kore-nav__sheet-item:not(:last-child):not(.is-cta) .kore-nav__sheet-link::after,
.kore-nav__sheet-item:not(:last-child):not(.is-cta) .kore-nav__sheet-row::after {
  content: '>';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  color: oklch(40% 0.02 var(--dark-h, 140) / 60%);
  margin-left: auto;
  transition: transform var(--duration-fast, 0.2s) ease, color var(--duration-fast, 0.2s) ease;
}
.kore-nav__sheet-item:not(:last-child):not(.is-cta) :is(.kore-nav__sheet-link:hover, .kore-nav__sheet-row:hover) {
  color: var(--brand);
}
.kore-nav__sheet-item:not(:last-child):not(.is-cta) :is(.kore-nav__sheet-link:hover::after, .kore-nav__sheet-row:hover::after) {
  color: var(--brand);
  transform: translateX(0.1875rem);
}

/* Active Item (e.g. GUIDES) — Terracotta highlighted pill card */
.kore-nav__sheet-item.is-active:not(:last-child):not(.is-cta) {
  border-bottom: none;
  margin: var(--space-3xs) 0;
}
.kore-nav__sheet-item.is-active:not(:last-child):not(.is-cta) :is(.kore-nav__sheet-link, .kore-nav__sheet-row) {
  background-color: oklch(62% 0.175 41 / 18%);
  border: var(--border-width, 1px) solid var(--brand);
  border-radius: var(--radius-control);
  color: var(--brand);
  padding: 0 var(--space-sm);
}
.kore-nav__sheet-item.is-active:not(:last-child):not(.is-cta) :is(.kore-nav__sheet-link::after, .kore-nav__sheet-row::after) {
  color: var(--brand);
  font-weight: var(--font-weight-bold);
}

/* Last Item / Promoted CTA Button (e.g. SELL A TOAD) */
.kore-nav__sheet-item:last-child,
.kore-nav__sheet-item.is-cta {
  width: 100%;
  margin-top: var(--space-md);
  border-bottom: none;
}
.kore-nav__sheet-item:last-child .kore-nav__sheet-link,
.kore-nav__sheet-item.is-cta .kore-nav__sheet-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.125rem;
  padding: 0 var(--space-md);
  margin: 0;
  background-color: var(--brand);
  border: var(--border-width, 1px) solid var(--brand);
  border-radius: var(--radius-control);
  color: var(--white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  box-shadow: 0 2px 8px oklch(52% 0.19 38 / 25%), inset 0 1px 0 oklch(100% 0 0 / 20%);
  gap: var(--space-xs);
  transition: transform var(--duration-fast, 0.2s) ease, background-color var(--duration-fast, 0.2s) ease;
}
.kore-nav__sheet-item:last-child .kore-nav__sheet-link::after,
.kore-nav__sheet-item.is-cta .kore-nav__sheet-link::after {
  content: '→';
  display: inline-block;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin-left: var(--space-2xs);
  transition: transform var(--duration-fast, 0.2s) ease;
}
.kore-nav__sheet-item:last-child .kore-nav__sheet-link:hover,
.kore-nav__sheet-item.is-cta .kore-nav__sheet-link:hover {
  background-color: var(--brand-hover, oklch(48% 0.19 38));
  transform: translateY(-0.0625rem);
}
.kore-nav__sheet-item:last-child .kore-nav__sheet-link:hover::after,
.kore-nav__sheet-item.is-cta .kore-nav__sheet-link:hover::after {
  transform: translateX(0.1875rem);
}
.kore-nav__sheet-item:last-child .kore-nav__sheet-link:active,
.kore-nav__sheet-item.is-cta .kore-nav__sheet-link:active {
  transform: translateY(0.0625rem) scale(0.985);
}
.kore-nav__sheet-link:hover,
.kore-nav__sheet-row:hover {
  background-color: var(--surface-subtle);
  color: var(--brand);
}
.kore-nav__sheet-link.is-active,
.kore-nav__sheet-link[aria-current="page"] {
  color: var(--brand);
  font-weight: var(--font-weight-semibold);
  background-color: var(--surface-subtle);
}
.kore-nav__sheet-row > .kore-nav__sheet-link {
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: inherit;
  font-weight: inherit;
  flex: 1;
  pointer-events: none;
}
.kore-nav-mobile-details {
  width: 100%;
}
.kore-nav-mobile-details > summary {
  list-style: none;
}
.kore-nav-mobile-details > summary::-webkit-details-marker {
  display: none;
}
.kore-nav-mobile-details .kore-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.kore-nav-mobile-details[open] > summary .kore-chevron {
  transform: rotate(180deg);
}
.kore-nav__sheet-sub {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}
.kore-nav-mobile-details[open] > .kore-nav__sheet-sub {
  animation: gsMobileSubmenuSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes gsMobileSubmenuSlideDown {
  from { opacity: 0; transform: translateY(-0.375rem); }
  to   { opacity: 1; transform: translateY(0); }
}
.kore-nav__sheet-sub .kore-nav__sheet-link,
.kore-nav__sheet-sub .kore-nav__sheet-row {
  font-size: var(--font-size-sm);
  padding-left: var(--space-md);
  opacity: 0.9;
}
.kore-nav__sheet-sub .kore-nav__sheet-sub .kore-nav__sheet-link {
  font-size: var(--font-size-caption);
  padding-left: var(--space-lg);
  opacity: 0.8;
}

/* Mobile / Desktop Display Rules */
.kore-nav .mobile-only {
  display: none !important;
}
.kore-nav .desktop-only {
  display: flex !important;
}
@media (max-width: 1024px) {
  .kore-nav .desktop-only {
    display: none !important;
  }
  .kore-nav .mobile-only {
    display: flex !important;
  }
}
.view-mobile .desktop-only {
  display: none !important;
}
.view-mobile .mobile-only {
  display: flex !important;
}
.view-desktop .mobile-only {
  display: none !important;
}
.view-desktop .desktop-only {
  display: flex !important;
}

/* In-flow display override for showcases and sections */
:is([id^="sec-"], [id^="el-"], .section, .wrapper-wide) :is(.nav, [class*="nav-"]) {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  z-index: 10 !important;
}
