/* ===== Time Shadow - Sharp Trapezoid + Rim Glow ===== */
/*
 * ::after — sharp trapezoid ground shadow (clip-path, zero blur)
 *           top edge >= element width (--ts-ci controls the inset)
 * ::before — warm rim glow on the sun-facing edge (box-shadow layer)
 */

.time-shadow {
  position: relative;
}

/* Don't override overflow on elements that need scroll */
.time-shadow:not(.modal):not(.sidebar) {
  overflow: visible !important;
}

/* Rim glow layer: sits behind the element content */
.time-shadow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--ts-glow, none);
  pointer-events: none;
  z-index: 0;
}

/* Trapezoid ground shadow: solid, sharp edges, no blur */
.time-shadow::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
  width: var(--ts-sw, 90%);
  height: var(--ts-sh, 12px);
  left: 50%;
  bottom: 0;
  transform:
    translateX(calc(-50% + var(--ts-dx, 0px)))
    translateY(var(--ts-dy, 4px))
    skewX(var(--ts-skew, 0deg));
  background: var(--ts-color, rgba(0,0,0,0.35));
  /* Trapezoid: top edge narrower than bottom (--ts-ci), bottom = full width */
  clip-path: polygon(
    var(--ts-ci, 8%) 0%,
    calc(100% - var(--ts-ci, 8%)) 0%,
    100% 100%,
    0% 100%
  );
  border-radius: var(--ts-radius, 0px);
  filter: none;   /* SHARP edges — no blur */
  opacity: var(--ts-opacity, 0.4);
  transition: transform 0.5s ease, opacity 0.5s ease;
}