/* Novera Header v0.1.0 — Fictioneer 5.35.x */
.novera-header-active #full-navigation {
  --nvh-border: color-mix(in srgb, currentColor 12%, transparent);
}

.novera-header-active #full-navigation .main-navigation__wrapper {
  width: min(calc(100% - 64px), var(--nvh-content-width, 1240px));
  max-width: var(--nvh-content-width, 1240px);
  min-height: var(--nvh-nav-height, 96px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 48px);
}

.novera-header-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}

.novera-header-brand__link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.novera-header-brand__logo {
  width: var(--nvh-logo-width, 150px);
  height: auto;
  max-height: calc(var(--nvh-nav-height, 96px) - 24px);
  object-fit: contain;
  display: block;
}

.novera-header-brand__logo--dark { display: none; }
html[data-mode="dark"] .novera-header-brand__logo--light { display: none; }
html[data-mode="dark"] .novera-header-brand__logo--dark { display: block; }
html[data-mode="light"] .novera-header-brand__logo--light { display: block; }
html[data-mode="light"] .novera-header-brand__logo--dark { display: none; }

.novera-header-brand._text a {
  font-size: 1.35rem;
  font-weight: 800;
  color: currentColor;
}

.novera-header-active #full-navigation .main-navigation__left {
  min-width: 0;
  flex: 1 1 auto;
}

.novera-header-active #full-navigation .main-navigation__right {
  margin-left: auto;
  flex: 0 0 auto;
}

.novera-header-active #full-navigation .main-navigation__list {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 32px);
}

.novera-header-hide-menu #full-navigation .main-navigation__left { display: none !important; }

.novera-header-active #full-navigation .menu-item-icon > a,
.novera-header-active #full-navigation .menu-item-icon > button {
  border-radius: 10px;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.novera-header-active #full-navigation .menu-item-icon > a:hover,
.novera-header-active #full-navigation .menu-item-icon > button:hover {
  transform: translateY(-1px);
}

.novera-header-compact-icons #full-navigation .main-navigation__right .icon-menu {
  gap: 2px;
}
.novera-header-compact-icons #full-navigation .menu-item-icon > a,
.novera-header-compact-icons #full-navigation .menu-item-icon > button {
  padding-inline: 7px;
}

.novera-header-shadow #full-navigation .main-navigation__background {
  box-shadow: 0 8px 28px rgba(10, 25, 50, .08);
}
html[data-mode="dark"] body.novera-header-shadow #full-navigation .main-navigation__background {
  box-shadow: 0 10px 34px rgba(0, 0, 0, .25);
}

body.novera-header-force-sticky #full-navigation {
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
}

/* Account submenu */
.novera-header-refine-account #full-navigation .icon-menu-account > .sub-menu {
  min-width: 205px;
  padding: 8px;
  border: 1px solid var(--nvh-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .15);
}

.novera-header-refine-account #full-navigation .icon-menu-account > .sub-menu > .menu-item {
  margin: 0;
}

.novera-header-refine-account #full-navigation .icon-menu-account > .sub-menu a,
.novera-header-refine-account #full-navigation .icon-menu-account > .sub-menu button {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  text-align: left;
  line-height: 1.25;
  transition: background-color .16s ease, color .16s ease;
}

.novera-header-refine-account #full-navigation .icon-menu-account > .sub-menu a:hover,
.novera-header-refine-account #full-navigation .icon-menu-account > .sub-menu button:hover {
  background: color-mix(in srgb, #2f7cff 12%, transparent);
  color: #2f7cff;
}

html[data-mode="dark"] body.novera-header-refine-account #full-navigation .icon-menu-account > .sub-menu {
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

@media (max-width: 768px) {
  .novera-header-active #full-navigation .main-navigation__wrapper {
    width: calc(100% - 28px);
    min-height: var(--nvh-nav-height-mobile, 72px);
    gap: 12px;
  }
  .novera-header-brand__logo {
    width: var(--nvh-logo-width-mobile, 132px);
    max-height: calc(var(--nvh-nav-height-mobile, 72px) - 18px);
  }
  .novera-header-active #full-navigation .main-navigation__left {
    display: none;
  }
  .novera-header-active #full-navigation .main-navigation__right {
    margin-left: auto;
  }
}

/* v0.2.0 — Central de notificações */
.nvh-notifications{position:relative}.nvh-notification-button{position:relative}.nvh-notification-badge{position:absolute;top:1px;right:0;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#2f7cff;color:#fff;font-size:9px;font-weight:800;line-height:16px;text-align:center;box-shadow:0 0 0 2px var(--navigation-background,#fff)}
.nvh-notification-menu{display:none;position:absolute;z-index:1005;top:calc(100% + 10px);right:-8px;width:min(390px,calc(100vw - 24px));border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:14px;background:var(--navigation-submenu-background,var(--page-bg-color,#fff));box-shadow:0 18px 50px rgba(15,23,42,.18);overflow:hidden;color:var(--fg-700,currentColor)}
.nvh-notifications.is-open .nvh-notification-menu{display:block}.nvh-notification-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 17px 12px;border-bottom:1px solid color-mix(in srgb,currentColor 10%,transparent)}.nvh-notification-head>div{display:flex;flex-direction:column;gap:2px}.nvh-notification-head span{font-size:8px;letter-spacing:.16em;font-weight:800;color:#2f7cff}.nvh-notification-head strong{font-size:16px}.nvh-mark-all{border:0;background:transparent;color:#2f7cff;font-size:11px;font-weight:700;cursor:pointer}.nvh-notification-list{max-height:430px;overflow:auto}.nvh-notification-item{display:grid;grid-template-columns:38px minmax(0,1fr) 8px;gap:10px;align-items:start;padding:13px 16px;color:inherit!important;text-decoration:none!important;border-bottom:1px solid color-mix(in srgb,currentColor 8%,transparent);transition:background .15s ease}.nvh-notification-item:hover{background:color-mix(in srgb,#2f7cff 7%,transparent)}.nvh-notification-item.is-unread{background:color-mix(in srgb,#2f7cff 5%,transparent)}.nvh-notification-icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,#2f7cff 10%,transparent);font-size:18px}.nvh-notification-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.nvh-notification-copy strong{font-size:12px;line-height:1.25}.nvh-notification-copy span{font-size:11px;line-height:1.4;opacity:.76;white-space:normal}.nvh-notification-copy small{font-size:9px;opacity:.55}.nvh-unread-dot{width:7px;height:7px;margin-top:5px;border-radius:50%;background:#2f7cff}.nvh-notification-footer{display:block;padding:12px 16px;text-align:center;color:#2f7cff!important;font-size:11px;font-weight:800;text-decoration:none!important}.nvh-notification-empty{padding:28px;text-align:center}.nvh-notification-empty>span{display:block;font-size:25px;margin-bottom:7px}.nvh-notification-empty strong{display:block}.nvh-notification-empty p{margin:4px 0 0;font-size:11px;opacity:.62}
html[data-mode="dark"] .nvh-notification-menu{box-shadow:0 20px 55px rgba(0,0,0,.38)}
.nvh-notifications-page{padding:clamp(30px,5vw,70px) 20px}.nvh-notifications-shell{width:min(920px,100%);margin:0 auto;padding:clamp(22px,4vw,40px);border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:18px;background:var(--page-bg-color,#fff);box-shadow:0 15px 50px rgba(15,23,42,.05)}.nvh-notifications-page-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:24px;padding-bottom:18px;border-bottom:1px solid color-mix(in srgb,currentColor 10%,transparent)}.nvh-notifications-page-head span{font-size:9px;letter-spacing:.17em;font-weight:800;color:#2f7cff}.nvh-notifications-page-head h1{margin:.25rem 0;font-size:clamp(28px,4vw,42px)}.nvh-notifications-page-head p{margin:0;opacity:.65}.nvh-notifications-page-list{border:1px solid color-mix(in srgb,currentColor 10%,transparent);border-radius:14px;overflow:hidden}.nvh-notifications-page-list .nvh-notification-item:last-child{border-bottom:0}
@media(max-width:768px){.nvh-notification-menu{position:fixed;top:var(--nvh-nav-height-mobile,72px);right:10px;left:10px;width:auto}.nvh-notifications-page-head{align-items:flex-start;flex-direction:column}.nvh-notification-list{max-height:65vh}}

/* v0.2.1 — refinamento mobile e histórico de notificações */
.nvh-notification-item.is-read {
  background: transparent;
  opacity: .82;
}
.nvh-notification-item.is-read:hover {
  opacity: 1;
  background: color-mix(in srgb,#2f7cff 6%,transparent);
}
.nvh-notification-empty {
  min-height: 150px;
  display: grid;
  place-content: center;
  padding: 30px 24px;
}
.nvh-notification-empty > span {
  width: 38px;
  height: 38px;
  margin: 0 auto 9px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb,#2f7cff 10%,transparent);
  color: #2f7cff;
  font-size: 18px;
  font-weight: 800;
}
.nvh-mobile-bell {
  position: relative;
}
.nvh-mobile-bell .nvh-notification-badge {
  top: -5px;
  right: -7px;
}
#mobile-menu-user-panel .nvh-mobile-notifications-link {
  position: relative;
  display: flex;
  align-items: center;
}
.nvh-mobile-notification-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #2f7cff;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 20px;
}
@media (max-width: 768px) {
  .nvh-notification-menu {
    position: fixed;
    z-index: 100000;
    top: calc(var(--nvh-nav-height-mobile,72px) + 8px);
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - var(--nvh-nav-height-mobile,72px) - 24px);
    border-radius: 16px;
  }
  .nvh-notification-list {
    max-height: min(62dvh, 520px);
  }
  .nvh-notification-head {
    padding: 15px 16px 12px;
  }
  .nvh-notification-item {
    grid-template-columns: 40px minmax(0,1fr) 8px;
    padding: 14px 15px;
  }
  .nvh-notifications-page {
    padding: 24px 14px 48px;
  }
  .nvh-notifications-shell {
    padding: 20px 16px;
    border-radius: 16px;
  }
}


/* v0.2.2 — destino exato de respostas a comentários */
.fictioneer-comment.nvh-comment-highlight,
li.fictioneer-comment.nvh-comment-highlight {
  position: relative;
  border-radius: 12px;
  outline: 2px solid color-mix(in srgb, #2f7cff 72%, transparent);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px color-mix(in srgb, #2f7cff 10%, transparent), 0 12px 34px color-mix(in srgb, #2f7cff 12%, transparent);
  transition: outline-color .35s ease, box-shadow .35s ease, background-color .35s ease;
}
html[data-mode="dark"] .fictioneer-comment.nvh-comment-highlight,
html[data-mode="dark"] li.fictioneer-comment.nvh-comment-highlight {
  box-shadow: 0 0 0 8px color-mix(in srgb, #2f7cff 14%, transparent), 0 14px 38px rgba(0,0,0,.28);
}

/* v0.3.0 — Central de notificações por categorias */
.nvh-notification-head {
  min-height: 58px;
}
.nvh-mark-all-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  opacity: .72;
  transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.nvh-mark-all-icon:hover:not(:disabled) {
  background: color-mix(in srgb,#2f7cff 10%,transparent);
  color: #2f7cff;
  opacity: 1;
}
.nvh-mark-all-icon:disabled { opacity: .28; cursor: default; }
.nvh-notification-tabs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border-bottom: 1px solid color-mix(in srgb,currentColor 10%,transparent);
  background: color-mix(in srgb,currentColor 2%,transparent);
}
.nvh-notification-tab {
  position: relative;
  min-width: 0;
  height: 48px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  opacity: .68;
  transition: color .15s ease, opacity .15s ease, background .15s ease, border-color .15s ease;
}
.nvh-notification-tab:hover { opacity: 1; background: color-mix(in srgb,#2f7cff 5%,transparent); }
.nvh-notification-tab.is-active {
  opacity: 1;
  color: #2f7cff;
  border-bottom-color: #2f7cff;
}
.nvh-notification-tab-icon { display: inline-grid; place-items: center; font-size: 11px; }
.nvh-tab-count {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2f7cff;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  line-height: 17px;
}
.nvh-notification-panel { display: none; }
.nvh-notification-panel.is-active { display: block; }
.nvh-notification-panels { max-height: 430px; overflow: auto; }
.nvh-notification-panels .nvh-notification-item:last-child { border-bottom: 0; }
.nvh-notification-panel .nvh-notification-empty {
  min-height: 155px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px 20px;
}
.nvh-notification-panel .nvh-notification-empty > span {
  font-size: 27px;
  opacity: .35;
}
.nvh-notification-panel .nvh-notification-empty strong { margin-top: 4px; font-size: 13px; }
.nvh-notification-panel .nvh-notification-empty p { max-width: 280px; line-height: 1.45; }

.nvh-notifications-page-tabs .nvh-notification-tabs {
  margin: 0 0 18px;
  border: 1px solid color-mix(in srgb,currentColor 10%,transparent);
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb,currentColor 2%,transparent);
}
.nvh-notifications-page-tabs .nvh-notification-tab { height: 52px; font-size: 11px; }
.nvh-notifications-page-tabs .nvh-notification-panels {
  max-height: none;
  overflow: visible;
  border: 1px solid color-mix(in srgb,currentColor 10%,transparent);
  border-radius: 14px;
  overflow: hidden;
}
.nvh-notifications-page-tabs .nvh-notification-panel .nvh-notification-empty { min-height: 220px; }

html[data-mode="dark"] .nvh-notification-tab.is-active { color: #75a8ff; border-bottom-color: #75a8ff; }
html[data-mode="dark"] .nvh-tab-count { background: #4f8cff; }

@media (max-width:768px) {
  .nvh-notification-tab { height: 45px; padding: 0 6px; gap: 5px; font-size: 9px; }
  .nvh-notification-tab-icon { font-size: 10px; }
  .nvh-tab-count { min-width: 16px; height: 16px; font-size: 7px; line-height: 16px; }
  .nvh-notification-panels { max-height: min(58dvh,480px); }
  .nvh-notifications-page-tabs .nvh-notification-tabs { grid-template-columns: 1fr; border-radius: 12px; }
  .nvh-notifications-page-tabs .nvh-notification-tab { justify-content: flex-start; padding: 0 14px; border-bottom: 1px solid color-mix(in srgb,currentColor 8%,transparent); border-left: 3px solid transparent; }
  .nvh-notifications-page-tabs .nvh-notification-tab.is-active { border-bottom-color: color-mix(in srgb,currentColor 8%,transparent); border-left-color: #2f7cff; }
}

/* v0.3.1 — refinamento final de proporção do cabeçalho (desktop)
   Mantém toda a lógica, notificações, dropdowns e mobile da v0.3.0. */
@media (min-width: 769px) {
  .novera-header-active #full-navigation .main-navigation__wrapper {
    width: min(calc(100% - 48px), var(--nvh-content-width, 1120px));
    max-width: var(--nvh-content-width, 1120px);
    min-height: var(--nvh-nav-height, 82px);
    gap: 24px;
  }

  .novera-header-active #full-navigation .main-navigation__left {
    flex: 0 1 auto;
    margin-right: auto;
  }

  .novera-header-active #full-navigation .main-navigation__list {
    gap: 18px;
  }

  .novera-header-brand__logo {
    width: var(--nvh-logo-width, 140px);
    max-height: calc(var(--nvh-nav-height, 82px) - 22px);
  }

  .novera-header-active #full-navigation .main-navigation__right {
    margin-left: auto;
  }

  .novera-header-active #full-navigation .main-navigation__right .icon-menu {
    gap: 4px;
  }

  .novera-header-active #full-navigation .main-navigation__right .menu-item-icon > a,
  .novera-header-active #full-navigation .main-navigation__right .menu-item-icon > button,
  .novera-header-active #full-navigation .nvh-notification-button {
    padding-inline: 6px;
  }
}
