/* Arte temático precocinado: NO mostrar el recurso original detrás de los
   píxeles transparentes. Brillo/opacidad ya están en el WebP guardado.
   La clase sólo se asigna cuando el post tiene renderedPath válido. */
.br-thematic-layered.br-has-thematic-baked > .br-thematic-art-layer{
  background:none!important;
  opacity:1!important;
  filter:none!important;
  -webkit-filter:none!important;
}
/* Brintage – controles de arte temático, aislamiento de las fotos. */
.br-thematic-layered.br-has-thematic-visual > .br-thematic-art-layer{
  background:none!important;
  opacity:var(--br-theme-art-opacity,1)!important;
  filter:brightness(var(--br-theme-brightness,1))!important;
  -webkit-filter:brightness(var(--br-theme-brightness,1))!important;
}
.br-thematic-layered.br-has-thematic-visual > .br-thematic-detail-layer{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  z-index:11!important;object-fit:fill!important;display:block!important;pointer-events:none!important;
  opacity:var(--br-theme-detail-opacity,0)!important;
  filter:brightness(var(--br-theme-brightness,1))!important;
  -webkit-filter:brightness(var(--br-theme-brightness,1))!important;
}
#createpost .cp-thematic-visual-toggle{flex:1;min-width:0;position:relative;display:grid;place-items:center;gap:4px;background:#fff;border:0;border-left:1px solid #e4eaf5;color:#9252da;cursor:pointer;}
#createpost .cp-thematic-visual-toggle[hidden]{display:none!important;}
#createpost .cp-thematic-visual-toggle.is-open{background:#f5efff;box-shadow:inset 0 -3px 0 #974dea;}
#createpost .cp-thematic-visual-icon{font:700 25px/1 Arial,sans-serif;}
.cp-thematic-visual-panel[hidden]{display:none!important;}
.cp-thematic-visual-panel{
  position:fixed;z-index:2147481700;top:0;left:0;bottom:auto;transform:none;
  width:min(360px,calc(100vw - 24px));font-family:Arial,Helvetica,sans-serif;color:#25314b;
}
@media(min-width:769px){
  .cp-thematic-visual-panel:not(.is-positioned){visibility:hidden}
  .cp-thematic-visual-panel::before{
    content:"";position:absolute;z-index:2;top:var(--theme-arrow-y,50%);
    width:15px;height:15px;background:#fff;border:1px solid #e2d9f7;
    transform:translateY(-50%) rotate(45deg);pointer-events:none;
  }
  .cp-thematic-visual-panel[data-side="right"]::before{
    left:-8px;border-top:0;border-right:0;
  }
  .cp-thematic-visual-panel[data-side="left"]::before{
    right:-8px;border-bottom:0;border-left:0;
  }
  .cp-thematic-visual-handle{display:none}
}
.cp-thematic-visual-sheet{padding:14px 18px 16px;background:#fff;border:1px solid #e2d9f7;border-radius:23px;box-shadow:0 14px 50px rgba(44,27,92,.22);box-sizing:border-box;}
.cp-thematic-visual-handle{width:38px;height:4px;background:#d5c7e9;border-radius:8px;margin:0 auto 11px;}
.cp-thematic-visual-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px;}
.cp-thematic-visual-head>div{display:flex;flex-direction:column;gap:4px;}
.cp-thematic-visual-head strong{font-size:16px;color:#4c287e;}
.cp-thematic-visual-head small{font-size:12px;color:#788196;}
.cp-thematic-visual-close{width:31px;height:31px;border:0;border-radius:50%;background:#f3effb;color:#6a548c;font-size:23px;cursor:pointer;}
.cp-thematic-visual-row{display:grid;grid-template-columns:1fr auto;column-gap:10px;row-gap:8px;margin:10px 0 15px;align-items:center;font-size:13px;font-weight:700;}
.cp-thematic-visual-row output{color:#7b43c5;font-size:13px;font-variant-numeric:tabular-nums;}
.cp-thematic-visual-row input[type=range]{grid-column:1/-1;width:100%;margin:0;height:26px;accent-color:#8d4bdc;cursor:pointer;touch-action:pan-x;}
.cp-thematic-visual-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px;border-top:1px solid #f0eaf6;}
.cp-thematic-visual-foot span{font-size:11px;color:#788196;}
.cp-thematic-visual-reset{border:1px solid #d8c5f6;background:#f6f0ff;color:#7c39bc;padding:9px 12px;font-size:12px;font-weight:700;border-radius:10px;cursor:pointer;}
@media(max-width:768px){.cp-thematic-visual-panel{left:8px!important;top:auto!important;bottom:max(10px,env(safe-area-inset-bottom));width:calc(100% - 16px);max-height:calc(100dvh - 20px);overflow:auto}.cp-thematic-visual-panel::before{display:none!important}.cp-thematic-visual-sheet{border-radius:20px;padding:12px 16px 15px;}#createpost .cp-thematic-visual-icon{font-size:23px;}}
/* El sexto botón solo ocupa espacio en el modo Temáticos; no cambia los demás. */
#createpost.cp-brintage-toolbar-v2 .cp-collage-tools:has(> .cp-thematic-visual-toggle:not([hidden])){
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
}
#createpost.cp-brintage-toolbar-v2 .cp-collage-tools > .cp-thematic-visual-toggle{color:#9450d6!important;}
#createpost.cp-brintage-toolbar-v2 .cp-collage-tools > .cp-thematic-visual-toggle.is-open{background:#f5efff!important;}
/* Hidden must beat the later loaded toolbar's !important display:flex rule. */
#createpost.cp-brintage-toolbar-v2 .cp-collage-tools > .cp-thematic-visual-toggle[hidden]{display:none!important;}

/* Panel de Diseño: escritorio colgando DEBAJO del botón (flecha arriba).
   Se respeta íntegramente la apariencia de sliders, títulos y Restablecer. */
@media(min-width:769px){
  .cp-thematic-visual-panel[data-side="bottom"]::before{
    top:-8px!important;
    left:var(--theme-arrow-x,50%)!important;
    width:15px;height:15px;
    transform:translateX(-50%) rotate(45deg)!important;
    background:#fff!important;
    border:1px solid #e2d9f7!important;
    border-right:0!important;
    border-bottom:0!important;
  }
  .cp-thematic-visual-panel[data-side="bottom"]{
    overflow:visible!important;
  }
  .cp-thematic-visual-panel[data-side="bottom"] > .cp-thematic-visual-sheet{
    max-height:inherit;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
}
