/* LEAL3D_V65_SISTEMA_UNIFICADO_DE_BANNERS */

/* Uma única animação global de ênfase: somente opacidade. */
@keyframes l3d-emphasis-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: var(--l3d-emphasis-min-opacity, .38); }
}

#reanalyze.l3d-needs-reprocess,
.l3d-selection-reprocess:not(:disabled),
.l3d-selection-modes button.is-active,
#l3dMoreToolsToggle.is-open .l3d-more-tools-face {
  animation: l3d-emphasis-opacity var(--l3d-emphasis-duration, 1.25s) ease-in-out infinite !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #reanalyze.l3d-needs-reprocess,
  .l3d-selection-reprocess:not(:disabled),
  .l3d-selection-modes button.is-active,
  #l3dMoreToolsToggle.is-open .l3d-more-tools-face {
    animation: none !important;
  }
}

/* O estado is-active usa as mesmas cores editáveis do estado ativo. */
.l3d-selection-modes button.is-active {
  opacity: 1;
}

.app-shell {
  position: relative !important;
  isolation: isolate;
}

/* ============================================================
   BOTÃO SOBREPOSTO AO TERCEIRO BANNER
   ============================================================ */

.l3d-more-tools-toggle {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  z-index: 80 !important;
  width: var(--l3d-more-tools-width, var(--l3d-more-auto-width, 42px)) !important;
  height: var(--banner-height, 140px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 var(--l3d-banner-corner-radius, 23px) 0 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  isolation: isolate;
}

.l3d-more-tools-cover,
.l3d-more-tools-face {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border-radius: inherit;
}

.l3d-more-tools-content {
  position: absolute;
  left: calc(0px + var(--l3d-more-content-offset-x, 0px));
  top: calc(50% + var(--l3d-more-content-offset-y, 0px));
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--l3d-more-gap, 6px);
  padding-inline: var(--l3d-more-padding-x, 4px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.l3d-more-tools-cover {
  z-index: 0;
  background: var(--l3d-more-cover-bg, #09090b);
  pointer-events: none;
}

.l3d-more-tools-face {
  z-index: 1;
  background: var(--l3d-more-bg, #27272a);
  box-shadow: var(--l3d-more-shadow, none);
  transition:
    background-color .18s ease,
    color .18s ease,
    opacity .18s ease;
  pointer-events: none;
}

.l3d-more-tools-toggle:hover .l3d-more-tools-face {
  background: var(--l3d-more-hover-bg, #3f3f46);
}

.l3d-more-tools-toggle.is-open .l3d-more-tools-face {
  background: var(--l3d-more-active-bg, #18181b);
}

.l3d-more-tools-circle {
  width: var(--l3d-more-circle-size, 42px);
  height: var(--l3d-more-circle-size, 42px);
  flex: 0 0 var(--l3d-more-circle-size, 42px);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: var(--l3d-more-circle-border-width, 2px) solid var(--l3d-more-circle-border, #a1a1aa);
  border-radius: var(--l3d-more-circle-radius, 999px);
  background: var(--l3d-more-circle-bg, #ffffff);
  transition: background-color .18s ease, border-color .18s ease;
}

.l3d-more-tools-toggle:hover .l3d-more-tools-circle {
  background: var(--l3d-more-circle-hover-bg, #f4f4f5);
  border-color: var(--l3d-more-circle-hover-border, #ffffff);
}

.l3d-more-tools-toggle.is-open .l3d-more-tools-circle {
  background: var(--l3d-more-circle-active-bg, #ffffff);
  border-color: var(--l3d-more-circle-active-border, #ffffff);
}

.l3d-more-tools-symbol {
  color: var(--l3d-more-symbol, #18181b);
  font-size: var(--l3d-more-symbol-size, 28px);
  font-weight: var(--l3d-more-symbol-weight, 800);
  line-height: 1;
  transform: translateY(-.02em);
}

.l3d-more-tools-toggle:hover .l3d-more-tools-symbol {
  color: var(--l3d-more-symbol-hover, #09090b);
}

.l3d-more-tools-toggle.is-open .l3d-more-tools-symbol {
  color: var(--l3d-more-symbol-active, #09090b);
}

.l3d-more-tools-text {
  color: var(--l3d-more-text, #ffffff);
  font-size: var(--l3d-more-text-size, 8.5px);
  font-weight: var(--l3d-more-text-weight, 800);
  line-height: var(--l3d-more-text-line-height, 1.02);
  letter-spacing: var(--l3d-more-text-letter-spacing, .02em);
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.l3d-more-tools-toggle:hover .l3d-more-tools-text {
  color: var(--l3d-more-text-hover, #ffffff);
}

.l3d-more-tools-toggle.is-open .l3d-more-tools-text {
  color: var(--l3d-more-text-active, #ffffff);
}

.l3d-more-tools-toggle.l3d-no-extra-tools {
  opacity: .45;
  cursor: default;
}

/* ============================================================
   MENU EXPANDIDO
   ============================================================ */

.l3d-expanded-tools-panel {
  position: absolute;
  z-index: 55;
  top: var(--banner-height, 140px);
  left: 0;
  right: 0;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0 0 var(--l3d-banner-corner-radius, 23px) var(--l3d-banner-corner-radius, 23px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--l3d-tool-menu-transition, 320ms) ease, visibility 0s linear var(--l3d-tool-menu-transition, 320ms);
}

.l3d-expanded-tools-panel.hidden {
  display: none !important;
}

.l3d-expanded-tools-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.l3d-expanded-tools-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--l3d-tool-menu-overlay, rgba(9,9,11,.42));
  backdrop-filter: blur(var(--l3d-tool-menu-blur, 14px));
  -webkit-backdrop-filter: blur(var(--l3d-tool-menu-blur, 14px));
}

.l3d-expanded-tools-rows {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--l3d-tool-menu-row-gap, 24px);
  padding: var(--l3d-tool-menu-padding-top, 24px) 0 var(--l3d-tool-menu-padding-bottom, 24px);
}

.l3d-extra-tools-row {
  position: relative;
  width: 100%;
  height: var(--banner-height, 140px);
  flex: 0 0 var(--banner-height, 140px);
}

.l3d-extra-tool-navigator {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 0 !important;
}

.l3d-extra-label-navigator {
  z-index: 65;
}

.l3d-extra-tool-navigator .tool-card:nth-child(1),
.l3d-extra-tool-navigator .tool-card:nth-child(2),
.l3d-extra-tool-navigator .tool-card:nth-child(3) {
  --shape-radius: 0 !important;
}

/* Mantém as três posições fixas mesmo quando a última linha tem 1 ou 2 itens. */
.l3d-extra-label-navigator .tool-label-button:nth-child(1) { left: 18.166667%; }
.l3d-extra-label-navigator .tool-label-button:nth-child(2) { left: 53%; }
.l3d-extra-label-navigator .tool-label-button:nth-child(3) { left: 84.833333%; }

.tool-card,
.tool-label-button,
.tool-card-bg,
.tool-label-pill {
  transition:
    opacity calc(var(--l3d-tool-menu-transition, 320ms) / 2) ease,
    background-color .16s ease,
    color .16s ease,
    box-shadow .16s ease !important;
}

.l3d-banner-swap-out {
  opacity: 0 !important;
  pointer-events: none !important;
}

.l3d-banner-swap-in {
  animation: l3d-banner-fade-in calc(var(--l3d-tool-menu-transition, 320ms) / 2) ease both;
}

@keyframes l3d-banner-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* A primeira linha continua acima da camada desfocada e clicável. */
.tool-label-navigator,
#toolNavigator,
#l3dMoreToolsToggle {
  pointer-events: auto;
}

@media (max-width: 1279.98px) {
  .l3d-more-tools-toggle {
    width: max(34px, var(--l3d-more-tools-width, 42px)) !important;
  }

  .l3d-more-tools-circle {
    width: min(var(--l3d-more-circle-size, 42px), 34px);
    height: min(var(--l3d-more-circle-size, 42px), 34px);
    flex-basis: min(var(--l3d-more-circle-size, 42px), 34px);
  }

  .l3d-more-tools-text {
    font-size: min(var(--l3d-more-text-size, 8.5px), 7px);
  }
}


/* LEAL3D_V64_REV2_GERENCIADOR_BANNERS */
.l3d-ve-banner-manager[hidden] {
  display: none !important;
}

.l3d-ve-banner-manager {
  position: fixed;
  inset: 0;
  z-index: 100120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(12px);
}

.l3d-ve-banner-manager-card {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: #1f1f21;
  color: #f4f4f5;
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
}

.l3d-ve-banner-manager-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.l3d-ve-banner-manager-card > header span {
  display: block;
  margin-bottom: 4px;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.l3d-ve-banner-manager-card > header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.l3d-ve-banner-manager-card > header p {
  max-width: 560px;
  margin: 8px 0 0;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.45;
}

#l3dVeCloseBannerManager {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #f4f4f5;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

#l3dVeCloseBannerManager:hover {
  background: rgba(255,255,255,.15);
}

.l3d-ve-banner-manager-list {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 22px;
  overflow: auto;
}

.l3d-ve-banner-manager-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: #29292c;
  color: #f4f4f5;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.l3d-ve-banner-manager-item:hover {
  border-color: rgba(56,189,248,.75);
  background: #323237;
  transform: translateY(-1px);
}

.l3d-ve-banner-manager-thumb {
  width: 76px;
  height: 56px;
  overflow: hidden;
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.015)),
    #18181b;
  background-position: center;
  background-size: cover;
}

.l3d-ve-banner-manager-copy {
  min-width: 0;
}

.l3d-ve-banner-manager-copy b,
.l3d-ve-banner-manager-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.l3d-ve-banner-manager-copy b {
  font-size: 14px;
}

.l3d-ve-banner-manager-copy small {
  margin-top: 5px;
  color: #a1a1aa;
  font-size: 11px;
}

.l3d-ve-banner-manager-edit {
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
}

.l3d-ve-banner-manager-card > footer {
  padding: 14px 24px 17px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #a1a1aa;
  font-size: 12px;
}

@media (max-width: 720px) {
  .l3d-ve-banner-manager {
    padding: 12px;
  }

  .l3d-ve-banner-manager-list {
    grid-template-columns: 1fr;
    padding: 14px;
  }
}


/* ============================================================
   V65 — TODOS OS BANNERS USAM O MESMO RENDERIZADOR
   ============================================================ */
.tool-card[data-l3d-banner-owned="1"] {
  --tool-color: #303034;
  --tool-opacity: .48;
  --tool-active-opacity: 1;
}

.tool-card[data-l3d-banner-owned="1"] > .tool-card-shape {
  background-color: var(--tool-color, #303034) !important;
}

.tool-card[data-l3d-banner-owned="1"] .tool-card-bg {
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.tool-label-button[data-l3d-banner-owned="1"] .tool-label-text {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Os três espaços superiores são posições fixas; somente o conteúdo troca. */
#toolNavigator > .tool-card[data-banner-slot="0"],
#toolLabelNavigator > .tool-label-button[data-banner-slot="0"] { --l3d-banner-slot: 0; }
#toolNavigator > .tool-card[data-banner-slot="1"],
#toolLabelNavigator > .tool-label-button[data-banner-slot="1"] { --l3d-banner-slot: 1; }
#toolNavigator > .tool-card[data-banner-slot="2"],
#toolLabelNavigator > .tool-label-button[data-banner-slot="2"] { --l3d-banner-slot: 2; }


/* LEAL3D_V65_REV3_BANNERS_EXTRAS_SEM_CURVAS
   Somente os três banners da linha principal preservam os cantos superiores
   externos arredondados. Todas as linhas extras permanecem retas. */
.l3d-expanded-tools-panel
.l3d-extra-tools-row
.l3d-extra-tool-navigator
.tool-card {
  --shape-radius: 0px !important;
  border-radius: 0 !important;
}

.l3d-expanded-tools-panel
.l3d-extra-tools-row
.l3d-extra-tool-navigator
.tool-card-shape {
  --shape-radius: 0px !important;
  border-radius: 0 !important;
}
