/* =============================================================================
 * AMAC App Icons v1.0.0 -- styles for AMACAppIcons.html() (amac-app-icons-v1.js)
 * -----------------------------------------------------------------------------
 * Rounded-square ("squircle") tile with a top-lit gradient, a soft sheen and a
 * small drop shadow; the glyph is ~56% of the tile. Size with --ai-size.
 * ============================================================================= */
.amac-app-icon {
  --ai-size: 52px;
  --ai-from: #3b82c4;
  --ai-to: #022544;
  --ai-fg: #ffffff;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--ai-size);
  height: var(--ai-size);
  border-radius: 23%;
  background: linear-gradient(180deg, var(--ai-from) 0%, var(--ai-to) 100%);
  color: var(--ai-fg);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10),
    0 1px 2px rgba(2, 20, 40, 0.16),
    0 4px 12px rgba(2, 20, 40, 0.12);
}
/* Soft top sheen: the "glass" highlight that makes flat gradients read as lit. */
.amac-app-icon::after {
  content: "";
  position: absolute;
  inset: 0 0 45% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.amac-app-icon svg {
  position: relative;
  z-index: 1;
  width: 56%;
  height: 56%;
  stroke-width: 1.9;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}
/* Logo-image apps sit on a white tile with a hairline edge. */
.amac-app-icon--image {
  background: #ffffff;
  box-shadow:
    inset 0 0 0 0.5px rgba(2, 20, 40, 0.14),
    0 1px 2px rgba(2, 20, 40, 0.16),
    0 4px 12px rgba(2, 20, 40, 0.12);
}
.amac-app-icon--image::after { display: none; }
.amac-app-icon--image img {
  width: 74%;
  height: 74%;
  object-fit: contain;
  display: block;
}
/* Light-ground glyph tiles (e.g. Workday's white calendar) need the same hairline. */
.amac-app-icon[style*="--ai-from:#ffffff"] {
  box-shadow:
    inset 0 0 0 0.5px rgba(2, 20, 40, 0.14),
    0 1px 2px rgba(2, 20, 40, 0.16),
    0 4px 12px rgba(2, 20, 40, 0.12);
}
.amac-app-icon[style*="--ai-from:#ffffff"] svg { filter: none; }
html[data-theme="dark"] .amac-app-icon {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.30);
}
