/* Porterad från affectUI Empty Calendar (illustration), MIT, Copyright (c) 2026 Florian Höller */
.ui-ec {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  font-family: var(--sans);
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.ui-ec:focus-visible { outline: 2px solid rgba(217, 96, 28, 0.4); outline-offset: 2px; }
.ui-ec-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.ui-ec-art text { font-family: var(--sans); }

/* Inget rör sig av sig självt: platshållarna och skenet ligger stilla */
.ui-ec-blob { transform-origin: 160px 152px; opacity: 0.9; }

/* Främre kortet: lyfts och lutar vid hovring eller tryck */
.ui-ec-front {
  transform-origin: 160px 90px;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ui-ec-front:hover, .ui-ec[data-open] .ui-ec-front { transform: translate(0, -8px) rotate(2deg); }

/* Bakre korten: utfällda, glider längre ut vid hovring eller tryck */
.ui-ec-back {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ui-ec-back-left { transform: translate(-22px, 0) rotate(-3deg); }
.ui-ec-back-left:hover, .ui-ec[data-open] .ui-ec-back-left { transform: translate(-48px, 4px) rotate(-7deg); }
.ui-ec-back-right { transform: translate(22px, 0) rotate(3deg); }
.ui-ec-back-right:hover, .ui-ec[data-open] .ui-ec-back-right { transform: translate(48px, 4px) rotate(7deg); }

@media (prefers-reduced-motion: reduce) {
  .ui-ec-front, .ui-ec-back { transition: none; }
}

/* Mörkt läge, samma konvention som affectUI */
:where(.dark, [data-theme="dark"]) .ui-ec-card { fill: #1C1B1A; stroke: rgba(255, 255, 255, 0.1); }
:where(.dark, [data-theme="dark"]) .ui-ec-drop { flood-opacity: 0.45; }
:where(.dark, [data-theme="dark"]) .ui-ec-title { fill: rgba(255, 255, 255, 0.58); }
:where(.dark, [data-theme="dark"]) .ui-ec-badge { fill: rgba(240, 138, 75, 0.14); }
:where(.dark, [data-theme="dark"]) .ui-ec-badge + text { fill: #F08A4B; }
:where(.dark, [data-theme="dark"]) .ui-ec-bar { fill: rgba(255, 255, 255, 0.07); }
:where(.dark, [data-theme="dark"]) .ui-ec-btn { fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.08); }
:where(.dark, [data-theme="dark"]) .ui-ec-btn-ink { stroke: rgba(255, 255, 255, 0.4); }
:where(.dark, [data-theme="dark"]) .ui-ec-btn-label { fill: rgba(255, 255, 255, 0.4); }
:where(.dark, [data-theme="dark"]) .ui-ec-blob { fill: rgba(217, 96, 28, 0.22); }
:where(.dark, [data-theme="dark"]) #skec-stroke stop:first-child, :where(.dark, [data-theme="dark"]) #skec-stroke stop:last-child { stop-color: rgba(255, 255, 255, 0.1); }

/* Ingen orange glöd under korten */
.ui-ec-blob { display: none; }
