/* SaaSv106: one non-destructive circular tenant-logo contract.
   The bitmap is never clip-pathed. Every public tenant presentation is circular,
   content scale belongs to the image, and /inicio never inherits the /boletos frame. */

html[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="true"],
html[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="unknown"]{--rfsm-logo-filter:brightness(0) saturate(100%)}
html.dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="true"],
html.theme-dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="true"],
html[data-theme="dark"][data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="true"],
html.dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="unknown"],
html.theme-dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="unknown"],
html[data-theme="dark"][data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="unknown"]{--rfsm-logo-filter:brightness(0) saturate(100%) invert(1)}
html[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="light"]{--rfsm-logo-filter:none}
html.dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="light"],
html.theme-dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="light"],
html[data-theme="dark"][data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="light"]{--rfsm-logo-filter:invert(1)}
html[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="dark"]{--rfsm-logo-filter:invert(1)}
html.dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="dark"],
html.theme-dark[data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="dark"],
html[data-theme="dark"][data-site-logo-color-mode="auto"][data-site-logo-monochrome="true"][data-site-logo-transparency="false"][data-site-logo-background-tone="dark"]{--rfsm-logo-filter:none}
html[data-site-logo-color-mode="original"]{--rfsm-logo-filter:none}

img[data-rfsm-site-logo],
img.rfsm-site-loader__logo,
img.auth-tenant-logo,
img[src^="/images/logo.png"],
img[src^="/site-assets/logo"],
#inicioLogo,
body.sorteo-page #logo,
body.sorteo-page #res-logo,
body.sorteo-page #mobile-res-logo,
body.sorteo-page .sorteo-floating-header__logo{
  object-fit:contain!important;
  object-position:center!important;
  transform:scale(var(--rfsm-logo-content-scale,var(--rfsm-logo-scale,1)));
  transform-origin:center center;
  border-radius:0!important;
  -webkit-clip-path:none!important;
  clip-path:none!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Shape is applied to containers, never destructively to the bitmap.
   SaaSv106 makes the circular presentation canonical for every tenant logo. */
body.sorteo-page .sorteo-header-brand__logo-wrap,body.sorteo-page .sorteo-floating-header__logo-wrap{overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}

.rfsm-site-loader__logo-frame,
body.inicio-page .inicio-logo-wrap,
body.sorteo-page .sorteo-header-brand__logo-frame,
body.sorteo-page .sorteo-floating-header__logo-frame{
  border-radius:50%!important;
  overflow:hidden!important;
}

/* /inicio: circular silhouette and configured internal scale, always transparent/borderless. */
body.inicio-page .inicio-logo-wrap{
  display:grid!important;
  place-items:center!important;
  aspect-ratio:1/1;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body.inicio-page #inicioLogo{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}

/* Main /boletos hero keeps the tenant-configurable frame. The floating header has
   a dedicated glass contract in sorteo-v2.css and intentionally ignores this paint. */
body.sorteo-page .sorteo-header-brand__logo-frame{
  border-style:solid!important;
  border-width:var(--rfsm-logo-disc-border-width,0px)!important;
  border-color:var(--rfsm-logo-disc-border-color,transparent)!important;
  background:var(--rfsm-logo-disc-background,transparent)!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  width:76px!important;height:76px!important;max-width:76px!important;max-height:76px!important;
}
body.sorteo-page .sorteo-header-brand #logo{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}

html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] img[data-rfsm-site-logo],
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] img.rfsm-site-loader__logo,
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] img.auth-tenant-logo,
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] img[src^="/images/logo.png"],
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] img[src^="/site-assets/logo"],
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] #inicioLogo,
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] body.sorteo-page #res-logo,
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] body.sorteo-page #mobile-res-logo,
html[data-site-custom-logo][data-site-logo-color-mode][data-site-logo-monochrome] body.sorteo-page .sorteo-floating-header__logo{
  filter:var(--rfsm-logo-filter,none)!important;
  -webkit-filter:var(--rfsm-logo-filter,none)!important;
}

/* Main /boletos and Inicio may override the theme filter after actual surface sampling. */
html[data-site-logo-color-mode="original"] body.sorteo-page #logo,
html[data-site-logo-color-mode="original"] body.inicio-page #inicioLogo{filter:none!important;-webkit-filter:none!important}

@media(max-width:760px){
  body.sorteo-page .sorteo-header-brand__logo-frame{width:64px!important;height:64px!important;max-width:64px!important;max-height:64px!important}
}

/* SaaSv106 · fallback circular presentation for customer-logo surfaces that do not
   provide a dedicated frame. Known framed surfaces keep clipping on their wrapper. */
html[data-site-custom-logo="true"] img.auth-tenant-logo,
html[data-site-custom-logo="true"] img[data-rfsm-site-logo]:not(#inicioLogo):not(#logo):not(.sorteo-floating-header__logo):not(.rfsm-site-loader__logo),
html[data-site-custom-logo="true"] img[src^="/site-assets/logo"]:not(#inicioLogo):not(#logo):not(.sorteo-floating-header__logo):not(.rfsm-site-loader__logo){
  border-radius:50%!important;
  aspect-ratio:1/1;
  object-fit:contain!important;
  object-position:center!important;
}
