.animated-asset{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    /* width: var(--animated-asset-size, 42px); */
    /* height: var(--animated-asset-size, */
    line-height:1;vertical-align:middle;
    flex:0 0 auto;overflow:hidden
    
}
.animated-asset img{width:100%;height:100%;object-fit:contain;display:block}
.animated-asset-player lottie-player,.animated-asset-player dotlottie-player{display:block;max-width:100%;max-height:100%}
.animated-assets-reduced-motion .animated-asset-player lottie-player,.animated-assets-reduced-motion .animated-asset-player dotlottie-player{display:none!important}
.admin-block-icon-animation{width:34px!important;height:34px!important;border-radius:12px;background:rgba(255,255,255,.76);box-shadow:0 6px 16px rgba(15,23,42,.08)}
.admin-sidebar-animation-wrap{
    display: grid!important;
    justify-content: center;
    align-items: center;
    margin: auto auto auto;
    min-height: 42px;
}
.admin-sidebar-animation{filter:drop-shadow(0 10px 24px rgba(15,23,42,.12))}
.animated-assets-admin-page{max-width:1180px;margin:0 auto;padding:22px}
.animated-assets-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.animated-asset-admin-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:14px;box-shadow:0 12px 30px rgba(15,23,42,.08);display:flex;flex-direction:column;gap:7px;min-height:190px}
.animated-asset-admin-card.is-disabled{opacity:.55;filter:grayscale(.25)}
.animated-asset-admin-preview{height:94px;border-radius:16px;background:linear-gradient(135deg,#f8fafc,#eef2ff);display:flex;align-items:center;justify-content:center;border:1px dashed rgba(59,130,246,.22);overflow:hidden}
.animated-asset-admin-card strong{font-size:14px;color:#0f172a;line-height:1.2}
.animated-asset-admin-card small{color:#64748b;font-weight:700;font-size:11px}
.animated-assets-editor-card code{display:block;word-break:break-all;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px;font-size:11px;color:#334155}
.admin-sidebar-admin-grid select[name="animation_asset_id"],.admin-sidebar-admin-grid select[name="icon_animation_asset_id"],.admin-sidebar-admin-grid select[name="bg_animation_asset_id"]{border-color:rgba(168,85,247,.35);background:linear-gradient(180deg,#fff,#faf5ff)}

/* Animated Assets Phase 2: top bar icon integration */
.top-icon-link .animated-asset,
.top-icon-link .topbar-animated-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:var(--animated-asset-size,26px);
  height:var(--animated-asset-size,26px);
  line-height:1;
  vertical-align:middle;
  pointer-events:none;
}
.top-icon-link .topbar-animated-icon img,
.top-icon-link .topbar-animated-icon lottie-player,
.top-icon-link .topbar-animated-icon dotlottie-player {
  max-width:100%;
  max-height:100%;
  display:block;
}
.top-icon-link .sr-only {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.topbar-icons-admin-page .topbar-icon-admin-list {
  display:grid;
  gap:12px;
}
.topbar-icon-admin-row {
  display:grid;
  grid-template-columns:72px minmax(110px,.75fr) minmax(140px,1fr) minmax(90px,.65fr) minmax(220px,1.5fr) minmax(110px,.75fr) 84px 70px;
  gap:10px;
  align-items:end;
  padding:12px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:18px;
  background:rgba(255,255,255,.82);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.topbar-icon-admin-row label {
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:12px;
  color:#64748b;
}
.topbar-icon-admin-row input,
.topbar-icon-admin-row select {
  width:100%;
  border:1px solid rgba(148,163,184,.45);
  border-radius:12px;
  padding:8px 9px;
  background:#fff;
  color:#0f172a;
}
.topbar-icon-admin-preview {
  min-height:48px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,rgba(15,23,42,.08),rgba(59,130,246,.08));
  border:1px solid rgba(148,163,184,.32);
}
.topbar-icon-admin-preview .top-icon-glyph { font-size:26px; }
.topbar-enabled { align-items:center; }
.topbar-enabled input { width:auto; transform:scale(1.15); }
.topbar-icons-reset-form { margin-top:12px; }
.topbar-icons-reset-form .danger {
  border:0;
  border-radius:12px;
  background:#fee2e2;
  color:#991b1b;
  padding:9px 13px;
  font-weight:800;
  cursor:pointer;
}
@media (max-width:1100px) {
  .topbar-icon-admin-row { grid-template-columns:64px 1fr 1fr; }
  .topbar-icon-admin-row .wide { grid-column:auto; }
}
@media (max-width:720px) {
  .topbar-icon-admin-row { grid-template-columns:1fr; }
  .topbar-icon-admin-preview { justify-content:flex-start; padding-left:14px; }
}


.admin-animated-layer-stack{
  --fg-animated-size:120px;
  --bg-animated-size:140px;
  --bg-layer-opacity:.75;
  --animated-box-bg:transparent;
  position:relative;
  width:100%;
  min-height:180px;
  border-radius:22px;
  overflow:hidden;
  background:var(--animated-box-bg);
  isolation:isolate;
  padding:10px;
}
.admin-sidebar-block.admin-block-style-bare .admin-animated-layer-stack{
  border-radius:0;
}
.admin-animated-layer{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.admin-animated-layer-bg{
  opacity:var(--bg-layer-opacity);
  z-index:1;
}
.admin-animated-layer-bg .animated-asset,
.admin-animated-layer-bg .animated-asset-player,
.admin-animated-layer-bg img{
  width:var(--bg-animated-size)!important;
  height:var(--bg-animated-size)!important;
  max-width:100%;
  max-height:100%;
}
.admin-animated-layer-fg{
  position:relative;
  z-index:2;
}
.admin-animated-layer-fg .animated-asset,
.admin-animated-layer-fg .animated-asset-player,
.admin-animated-layer-fg img{
  width:var(--fg-animated-size)!important;
  height:var(--fg-animated-size)!important;
  max-width:100%;
  max-height:100%;
}
.admin-animated-layer-bg.is-image img{
  object-fit:contain;
  filter:drop-shadow(0 6px 18px rgba(15,23,42,.08));
}
.admin-sidebar-animation-fg{filter:drop-shadow(0 12px 24px rgba(15,23,42,.14))}
.admin-sidebar-animation-bg{filter:drop-shadow(0 4px 16px rgba(15,23,42,.08))}


.topbar-two-layer-icon {
  --topbar-fg-size: 26px;
  --topbar-bg-size: 32px;
  --topbar-bg-opacity: .70;
  --topbar-box-color: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max(var(--topbar-bg-size), var(--topbar-fg-size));
  height: max(var(--topbar-bg-size), var(--topbar-fg-size));
  border-radius: 999px;
  background: var(--topbar-box-color);
  isolation: isolate;
}
.topbar-two-layer-bg,
.topbar-two-layer-fg {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.topbar-two-layer-bg {
  opacity: var(--topbar-bg-opacity);
  z-index: 1;
}
.topbar-two-layer-fg {
  z-index: 2;
}
.topbar-two-layer-bg .animated-asset,
.topbar-two-layer-bg .animated-asset-player,
.topbar-two-layer-bg img {
  width: var(--topbar-bg-size) !important;
  height: var(--topbar-bg-size) !important;
  max-width: 100%;
  max-height: 100%;
}
.topbar-two-layer-fg .animated-asset,
.topbar-two-layer-fg .animated-asset-player,
.topbar-two-layer-fg img {
  width: var(--topbar-fg-size) !important;
  height: var(--topbar-fg-size) !important;
  max-width: 100%;
  max-height: 100%;
}
.topbar-two-layer-bg-image img {
  object-fit: contain;
}
.topbar-icons-admin-page .topbar-icon-admin-row {
  grid-template-columns: 72px minmax(110px,.75fr) minmax(140px,1fr) minmax(90px,.65fr) minmax(220px,1.4fr) minmax(220px,1.4fr) minmax(140px,1fr) minmax(120px,.8fr) minmax(120px,.8fr) 84px 84px 100px 130px 84px;
}
@media (max-width: 1400px) {
  .topbar-icons-admin-page .topbar-icon-admin-row { grid-template-columns: repeat(4, minmax(150px,1fr)); }
}
@media (max-width: 720px) {
  .topbar-icons-admin-page .topbar-icon-admin-row { grid-template-columns: 1fr; }
}


/* Animated Assets Phase 3: universal layered renderer */
.animated-layer-stack {
  --animated-layer-fg-size: 42px;
  --animated-layer-bg-size: 52px;
  --animated-layer-bg-opacity: .70;
  --animated-layer-box-bg: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max(var(--animated-layer-fg-size), var(--animated-layer-bg-size));
  height: max(var(--animated-layer-fg-size), var(--animated-layer-bg-size));
  background: var(--animated-layer-box-bg);
  isolation: isolate;
}
.animated-layer {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.animated-layer-bg {
  opacity: var(--animated-layer-bg-opacity);
  z-index: 1;
}
.animated-layer-fg {
  z-index: 2;
}
.animated-layer-bg .animated-asset,
.animated-layer-bg .animated-asset-player,
.animated-layer-bg img {
  width: var(--animated-layer-bg-size) !important;
  height: var(--animated-layer-bg-size) !important;
  max-width: 100%;
  max-height: 100%;
}
.animated-layer-fg .animated-asset,
.animated-layer-fg .animated-asset-player,
.animated-layer-fg img {
  width: var(--animated-layer-fg-size) !important;
  height: var(--animated-layer-fg-size) !important;
  max-width: 100%;
  max-height: 100%;
}
.animated-layer-bg.is-image img {
  object-fit: contain;
}


/* Layered Animation Admin UI Polish Phase 2 */
.layered-admin-help{display:block;margin-top:6px;color:#64748b;font-size:11px;line-height:1.35;font-weight:700}.layered-admin-field{position:relative;border-radius:16px;padding:10px!important;border:1px solid rgba(148,163,184,.24);background:rgba(248,250,252,.7)}.layered-admin-field-foreground{background:linear-gradient(180deg,rgba(239,246,255,.86),rgba(255,255,255,.92));border-color:rgba(59,130,246,.24)}.layered-admin-field-background{background:linear-gradient(180deg,rgba(250,245,255,.86),rgba(255,255,255,.92));border-color:rgba(168,85,247,.25)}.layered-admin-field-title-icon{background:linear-gradient(180deg,rgba(236,253,245,.86),rgba(255,255,255,.92));border-color:rgba(16,185,129,.24)}.layered-admin-reset{margin-top:6px;border:0;border-radius:999px;background:#e2e8f0;color:#0f172a;font-size:11px;font-weight:900;padding:6px 9px;cursor:pointer}.layered-admin-reset:hover{background:#cbd5e1}.layered-admin-row-title{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-2px 0 4px;padding:10px 12px;border-radius:16px;background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(168,85,247,.10));border:1px solid rgba(148,163,184,.22)}.layered-admin-row-title b{color:#0f172a;font-size:13px}.layered-admin-row-title span{color:#64748b;font-size:12px;font-weight:900}.animated-asset-admin-preview,.topbar-icon-admin-preview{position:relative;overflow:hidden}.layered-preview-badge{position:absolute;right:8px;bottom:8px;z-index:9;border-radius:999px;background:rgba(15,23,42,.72);color:#fff;font-size:10px;font-weight:950;padding:4px 7px;letter-spacing:.02em}.topbar-icons-admin-page .topbar-icon-admin-row,.admin-sidebar-admin-card{border-color:rgba(148,163,184,.28)}.topbar-icons-admin-page .topbar-icon-admin-row{background:linear-gradient(180deg,#fff,rgba(248,250,252,.96))}.animated-assets-admin-page .alert.success{border-radius:14px;padding:10px 12px;background:#dcfce7;color:#166534;font-weight:900}.animated-assets-admin-page .alert.error{border-radius:14px;padding:10px 12px;background:#fee2e2;color:#991b1b;font-weight:900}


/* Main-site stabilization: make secondary/background animated sidebar asset fill its square/card. */
.admin-animated-layer-bg .animated-asset,
.admin-animated-layer-bg .animated-asset-player,
.admin-animated-layer-bg lottie-player,
.admin-animated-layer-bg dotlottie-player,
.animated-layer-bg .animated-asset,
.animated-layer-bg .animated-asset-player,
.animated-layer-bg lottie-player,
.animated-layer-bg dotlottie-player{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
}
.admin-animated-layer-bg.is-image img,
.animated-layer-bg.is-image img,
.admin-animated-layer-bg img,
.animated-layer-bg img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
