/* CENC Royale v000034b — Premium Asset Integration Pack
   Theme assets are optional and are exposed only by the effective theme asset set.
   CSS continues to use --theme-* tokens for every non-image decision. */

/* Generic premium images */
.royale-premium-icon{display:block;width:34px;height:34px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 6px 14px rgba(0,0,0,.28))}
.royale-premium-icon.is-card{width:30px;height:30px}
.royale-premium-icon.is-meta{width:30px;height:30px;margin-bottom:8px}
.royale-premium-icon.is-journey{width:54px;height:54px;margin-bottom:18px}
.royale-premium-icon.is-profile{width:42px;height:42px}
.royale-premium-icon-fallback{display:none}
.royale-card-kicker,.royale-profile-kicker,.royale-ranking-kicker{display:flex;align-items:center;gap:10px}
.royale-card-kicker small,.royale-card-kicker span{margin:0}

/* Premium event fallback + frame. Real event media stays untouched. */
.event-identity.is-premium-fallback{isolation:isolate}
.event-identity-picture{position:absolute;inset:0;z-index:0}
.event-identity-picture img{width:100%;height:100%;object-fit:cover}
.royale-event-frame{position:absolute;z-index:2;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;opacity:.92}
.event-identity.is-premium-fallback .event-identity-overlay{z-index:3}
.royale-event-card-media-wrap{position:relative;overflow:hidden;aspect-ratio:16/9}
.royale-event-card-media-wrap .royale-event-card-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.royale-event-card-frame{position:absolute;z-index:2;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;opacity:.9}

/* Premium participant fallback and frame */
.entry-media.has-premium-frame,.profile-photo.has-premium-frame,.checkout-avatar.has-premium-frame{isolation:isolate}
.royale-participant-fallback{position:absolute!important;z-index:0;inset:0;width:100%!important;height:100%!important;object-fit:cover!important}
.royale-participant-frame{position:absolute!important;z-index:3!important;inset:0;width:100%!important;height:100%!important;object-fit:fill!important;pointer-events:none}
.entry-media.has-premium-frame>img:not(.royale-participant-frame),.profile-photo.has-premium-frame>img:not(.royale-participant-frame),.checkout-avatar.has-premium-frame>img:not(.royale-participant-frame){z-index:1}
.entry-media .candidate-number,.profile-photo .candidate-number{z-index:5}

/* Entity cards and editorial heroes gain the approved premium icon language. */
.royale-entity-card .royale-card-kicker{padding-right:38px;color:var(--theme-primary);font-size:9px;letter-spacing:.16em;font-weight:900}
.royale-event-card .royale-card-kicker{color:var(--theme-primary)}
.royale-hero-premium-icon{width:min(58%,230px);height:auto;object-fit:contain;filter:drop-shadow(0 22px 34px rgba(0,0,0,.34))}
.royale-overview-meta>span{position:relative}
.royale-overview-meta>span .royale-premium-icon{margin-left:auto;margin-right:auto}

/* Section ornament: visual-only; omitted by custom themes without a theme asset set. */
.royale-premium-divider{width:min(calc(100% - (var(--royale-gutter) * 2)),760px);margin:clamp(18px,3vw,36px) auto 0;opacity:.68;overflow:hidden}
.royale-premium-divider img{display:block;width:100%;height:auto;max-height:80px;object-fit:cover;object-position:50% 0}
.royale-premium-divider.is-token-generated{height:1px;background:linear-gradient(90deg,transparent,var(--theme-border),transparent)}

/* Journey icons */
.royale-how-grid article{position:relative}
.royale-how-grid article>.royale-premium-icon+span{position:absolute;right:24px;top:24px}
.royale-how-grid article>.royale-premium-icon~strong{margin-top:12px}

/* Trust strip: desktop/tablet gets the authored visual. Mobile switches to readable live text. */
.royale-home-trust-wrap{padding:0 0 var(--royale-section-space)}
.royale-trust-component{width:100%}
.royale-trust-component-image{display:block;width:100%;height:auto;object-fit:contain;border-radius:calc(var(--theme-radius) + 4px);filter:drop-shadow(0 24px 60px rgba(0,0,0,.24))}
.royale-trust-component-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.royale-trust-component-grid.has-premium-image{display:none}
.royale-trust-component-grid article{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid color-mix(in srgb,var(--theme-border) 52%,transparent);border-radius:var(--theme-radius);background:color-mix(in srgb,var(--theme-surface) 94%,transparent)}
.royale-trust-component-grid article img{width:44px;height:44px;object-fit:contain;flex:0 0 auto}
.royale-trust-component-grid strong,.royale-trust-component-grid span{display:block}
.royale-trust-component-grid strong{color:var(--theme-accent);font-size:13px}
.royale-trust-component-grid span{margin-top:3px;color:var(--theme-muted);font-size:11px;line-height:1.45}
.checkout-summary .royale-trust-component{margin:10px 0 14px}
.checkout-summary .royale-trust-component-image{border-radius:14px}
.checkout-summary .royale-trust-component-grid{grid-template-columns:1fr}
.checkout-summary .royale-trust-component-grid article{padding:11px}
.checkout-summary .royale-trust-component-grid article img{width:36px;height:36px}

/* Badges */
.royale-premium-badge{display:block;max-width:100%;height:auto;object-fit:contain;filter:drop-shadow(0 10px 22px rgba(0,0,0,.32))}
.royale-premium-badge.is-voting-status{width:min(250px,42%);margin:0 0 8px auto}
.royale-premium-badge.is-checkout-status{width:min(260px,72%);margin:4px auto 8px}
.royale-premium-badge.is-ranking-status{width:min(280px,40vw);margin-top:16px}
.royale-premium-badge.is-podium-top{width:min(240px,92%);margin:-8px auto 12px}
.royale-voting-live-premium{position:relative;overflow:hidden}

/* Premium buttons use the authored vote icon when the theme exposes it. */
.royale-button-with-icon{display:inline-flex!important;align-items:center;justify-content:center;gap:9px}
.royale-button-with-icon img{width:30px;height:30px;object-fit:contain;margin:-5px 0;flex:0 0 auto}
.checkout-submit.royale-button-with-icon img{width:34px;height:34px}

/* Ranking */
.royale-ranking-kicker img{width:52px;height:52px;object-fit:contain}
.royale-podium-card.rank-1{overflow:visible}

/* Prevent the frame from hiding compact checkout content. */
.checkout-avatar .royale-participant-frame{opacity:.88}

@media(max-width:900px){
  .royale-trust-component-image{display:none}
  .royale-trust-component-grid.has-premium-image{display:grid}
  .royale-trust-component-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .royale-premium-badge.is-voting-status{width:min(260px,72%);margin:0 0 12px}
}

@media(max-width:760px){
  .royale-premium-icon.is-meta{width:26px;height:26px}
  .royale-premium-icon.is-card{width:28px;height:28px}
  .royale-premium-icon.is-journey{width:48px;height:48px}
  .royale-premium-divider{width:calc(100% - 32px);margin-top:18px}
  .royale-trust-component-grid,.royale-trust-component-grid.has-premium-image{grid-template-columns:1fr}
  .royale-trust-component-grid article{padding:13px}
  .royale-trust-component-grid article img{width:40px;height:40px}
  .royale-event-frame{opacity:.78}
  .royale-participant-frame{opacity:.86}
  .royale-premium-badge.is-ranking-status{width:min(250px,76vw)}
  .royale-premium-badge.is-podium-top{width:min(220px,78vw);margin-left:0}
  .mobile-vote-bar .royale-button-with-icon img{width:26px;height:26px}
}

@media(prefers-reduced-motion:reduce){
  .royale-premium-icon,.royale-premium-badge,.royale-event-frame,.royale-participant-frame{filter:none}
}
