/* Premium crown badge — dedicated asset styles (keeps app.css conflict surface small) */

.premium-crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.premium-crown img,
.premium-crown svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hero on Premium / upgrade sheet */
.premium-crown--hero {
  width: 4.75rem;
  height: 3.9rem;
  margin: 0 0 0.55rem;
  filter: drop-shadow(0 2px 4px rgba(58, 40, 16, 0.28));
}

.premium-head .premium-crown--hero {
  display: flex;
}

/* Offer / plan cards */
.premium-card {
  position: relative;
}

.premium-card .premium-crown--card {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2.65rem;
  height: 2.15rem;
  opacity: 0.96;
  filter: drop-shadow(0 1px 2px rgba(58, 40, 16, 0.22));
  z-index: 1;
  pointer-events: none;
}

.premium-card.premium-option .premium-crown--card {
  width: 2.25rem;
  height: 1.85rem;
  opacity: 0.88;
}

/* Leave room so title doesn’t collide with crown */
.premium-card > h3 {
  padding-right: 2.85rem;
}

.premium-card.premium-option > h3 {
  padding-right: 2.45rem;
}

/* Compact marker (nav / locked CTAs / profile) */
.premium-crown--sm {
  width: 1.35rem;
  height: 1.1rem;
  vertical-align: -0.15em;
  filter: drop-shadow(0 1px 1px rgba(58, 40, 16, 0.25));
}

.premium-crown--md {
  width: 2.1rem;
  height: 1.7rem;
  filter: drop-shadow(0 1px 2px rgba(58, 40, 16, 0.24));
}

/* Aktionen / Premium-Daily tile: ~3× --sm, living motion */
.premium-crown--aktionen {
  width: 4.05rem;
  height: 3.3rem;
  flex-shrink: 0;
  transform-origin: 50% 60%;
  filter: drop-shadow(0 2px 5px rgba(58, 40, 16, 0.28));
  animation: premium-crown-aktionen-play 5.2s ease-in-out infinite;
}

@keyframes premium-crown-aktionen-play {
  0%,
  100% {
    transform: translate(0, 0) rotate(-5deg) scale(1);
  }
  22% {
    transform: translate(0.18rem, -0.28rem) rotate(7deg) scale(1.07);
  }
  45% {
    transform: translate(-0.14rem, 0.1rem) rotate(-9deg) scale(1.02);
  }
  68% {
    transform: translate(0.22rem, -0.12rem) rotate(5deg) scale(1.09);
  }
  86% {
    transform: translate(-0.08rem, -0.2rem) rotate(-3deg) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-crown--aktionen {
    animation: none;
    transform: none;
  }
}

/* Honor row: reuse medal shell, crown art inside */
.honor-medal.honor-crown {
  width: 1.55rem;
  height: 1.3rem;
}

.honor-medal.honor-crown .honor-medal-svg,
.honor-medal.honor-crown img.premium-crown-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Online-Liste: gleiche visuelle Präsenz wie Zertifikats-Siegel */
.online-meta .honor-medal.honor-crown,
.online-nick-row .honor-medal.honor-crown,
.online-list .honor-medal.honor-crown,
.mobile-online-drawer .honor-medal.honor-crown {
  width: 1.75rem !important;
  height: 1.45rem !important;
  min-width: 1.75rem !important;
  min-height: 1.45rem !important;
  max-width: 1.75rem !important;
  max-height: 1.45rem !important;
  flex: 0 0 1.75rem !important;
  flex-shrink: 0 !important;
  transform: none !important;
}

/* Mobile-Bar: gleiche Höhe wie Zertifikat (1.425rem = ½ von 2.85rem); Breite nach SVG viewBox 160×132 */
.mobile-bar-name .honor-medal.honor-crown {
  width: 1.725rem !important;
  height: 1.425rem !important;
  min-width: 1.725rem !important;
  min-height: 1.425rem !important;
  max-width: 1.725rem !important;
  max-height: 1.425rem !important;
  flex: 0 0 1.725rem !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  padding: 0 !important;
}

/* Desktop-Kopf: gleiche Höhe wie Zertifikat (1.2rem); Breite nach SVG viewBox 160×132 */
.chm-honors .honor-medal.honor-crown {
  width: 1.45rem !important;
  height: 1.2rem !important;
  min-width: 1.45rem !important;
  min-height: 1.2rem !important;
  max-width: 1.45rem !important;
  max-height: 1.2rem !important;
  flex: 0 0 1.45rem !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.honor-medal-spotlight-clone .honor-medal.honor-crown {
  width: 4.5rem;
  height: 3.7rem;
}

/* Soft gold wash on offer cards — fits SchweizChat blues without clashing */
.premium-card:not(.premium-option) {
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, #f0d060 14%, var(--sheet-card-bg, var(--panel, #fff))) 0%,
      var(--sheet-card-bg, var(--panel, #fff)) 42%,
      var(--sheet-card-bg, var(--panel, #fff)) 100%
    );
  border-color: color-mix(in srgb, #d4a017 28%, var(--sheet-card-border, var(--divider, #d8dee8)));
}

html[data-theme="dark"] .premium-card:not(.premium-option) {
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, #d4a017 16%, var(--sheet-card-bg, #1a2234)) 0%,
      var(--sheet-card-bg, #1a2234) 48%,
      var(--sheet-card-bg, #1a2234) 100%
    );
  border-color: color-mix(in srgb, #e8c04a 22%, var(--sheet-card-border, #2a3550));
}

/* Premium buy / choose CTAs: subtle crown cue via CSS mask (decorative, non-blocking) */
.btn[data-premium-buy]::before,
.btn[data-view="premium"]::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 0.85em;
  margin-right: 0.35em;
  vertical-align: -0.05em;
  background: currentColor;
  -webkit-mask: url("/assets/img/premium-crown.svg") center / contain no-repeat;
  mask: url("/assets/img/premium-crown.svg") center / contain no-repeat;
  pointer-events: none;
  opacity: 0.92;
}

@media (max-width: 420px) {
  .premium-crown--hero {
    width: 4.1rem;
    height: 3.35rem;
  }
  .premium-card .premium-crown--card {
    width: 2.25rem;
    height: 1.85rem;
    top: 0.45rem;
    right: 0.45rem;
  }
  .premium-card > h3 {
    padding-right: 2.4rem;
  }
}
