/* Work Item Board Aging Styles */
.gl-wi-aging-card {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  isolation: isolate !important;
  transition: transform .25s ease, filter .25s ease;
}

.gl-wi-aging-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background-image: var(--paper-noise-url);
  background-size: 220px 220px;
  mix-blend-mode: multiply;
  transition: opacity .25s ease;
}

li.board-card .board-card-assignee {
    margin: 0 -12px;
}

.gl-wi-aging-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .25s ease;
}

/* STALE (30 - 119 days) */
.gl-wi-aging-stale {
  filter: sepia(0.18) saturate(0.92) contrast(0.99) !important;
}
.gl-wi-aging-stale::before { opacity: 0.35; }
.gl-wi-aging-stale::after {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(80, 55, 15, 0.20) 100%),
    linear-gradient(160deg, rgba(255, 240, 195, 0.20) 0%, rgba(220, 190, 130, 0.20) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(150, 110, 45, 0.23),
    inset 0 -8px 14px rgba(80, 50, 10, 0.10),
    inset 0  8px 14px rgba(80, 50, 10, 0.06);
}

/* ANCIENT (120+ days) */
.gl-wi-aging-ancient {
  filter: sepia(0.5) saturate(0.78) contrast(0.95) brightness(0.97) !important;
  transform: rotate(-0.4deg);
}
.gl-wi-aging-ancient::before { opacity: 0.7; }
.gl-wi-aging-ancient::after {
  opacity: 1;
  background:
    radial-gradient(circle at 78% 22%, rgba(101, 67, 33, 0.30) 0%, rgba(101, 67, 33, 0.18) 18%, transparent 35%),
    radial-gradient(circle at 22% 78%, rgba(101, 67, 33, 0.25) 0%, rgba(101, 67, 33, 0.14) 14%, transparent 32%),
    radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(60, 35, 5, 0.30) 100%),
    linear-gradient(160deg, rgba(255, 230, 165, 0.50) 0%, rgba(190, 150, 90, 0.30) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(110, 70, 20, 0.5),
    inset 0 -16px 22px rgba(60, 35, 5, 0.22),
    inset 0  16px 22px rgba(60, 35, 5, 0.12);
}

/* Cobweb corners */
.gl-wi-aging-web {
  position: absolute;
  z-index: 18;
  width: 84px;
  height: 84px;
  pointer-events: none;
  opacity: 0.8;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: var(--cobweb-svg-url);
  filter: drop-shadow(0 0 1px rgba(0,0,0,.18));
}
.gl-wi-aging-web-tl { top: -2px; left: -2px; }
.gl-wi-aging-web-tr { top: -2px; right: -2px; transform: scaleX(-1); }
.gl-wi-aging-web-br { right: -2px; bottom: -2px; transform: scale(-1, -1); }
.gl-wi-aging-web-bl { left: -2px; bottom: -2px; transform: scaleY(-1); }

/* Stamped age badge */
.gl-wi-aging-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(118, 70, 35, 0.92);
  color: #fdf3d4;
  font: 600 10px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  pointer-events: none;
  transform: rotate(-4deg);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.25),
    inset 0 0 0 1px rgba(255, 240, 200, 0.3);
}
.gl-wi-aging-ancient .gl-wi-aging-badge {
  background: rgba(80, 30, 20, 0.95);
  transform: rotate(-6deg);
}

/* Refresh banner */
.gl-wi-refresh-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: min(720px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 10px;
  background: #1f1f1f;
  color: white;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
}
.gl-wi-refresh-banner strong { white-space: nowrap; }
.gl-wi-refresh-banner button {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}
.gl-wi-refresh-action {
  margin-left: 4px;
  padding: 6px 10px;
  background: #7759c2;
  color: white;
}
.gl-wi-refresh-close {
  padding: 4px 8px;
  background: transparent;
  color: white;
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Disable / enable toggle */
.gl-wi-aging-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 999998;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: #1f1f1f;
  color: #f5f5f5;
  font: 600 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  opacity: 0.55;
  transition: opacity .2s ease, background-color .2s ease;
}
.gl-wi-aging-toggle:hover,
.gl-wi-aging-toggle:focus-visible {
  opacity: 1;
  outline: none;
}
.gl-wi-aging-toggle[data-state="disabled"] {
  background: #4a4a4a;
  color: #cfcfcf;
}

