/*!
YG3 — Shared action icons for hub + widgets (mobile + desktop)
Scopes: .yg3-hub .yg3-card__actions, .yg3w-hub .yg3-card__actions
Non-invasive: visual only; does NOT change any favourites logic.
*/

/* ---------------------------------------
   Base icon button frame (hub + widgets)
----------------------------------------*/
.yg3-hub .yg3-card__actions .yg3-btn,
.yg3-hub .yg3-card__actions a.yg3-btn,
.yg3-hub .yg3-card__actions button.yg3-btn,
.yg3w-hub .yg3-card__actions .yg3-btn,
.yg3w-hub .yg3-card__actions a.yg3-btn,
.yg3w-hub .yg3-card__actions button.yg3-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 8px 0 0;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 12px;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  vertical-align: middle;
  box-sizing: border-box;
  cursor: pointer;
}

.yg3-hub .yg3-card__actions .yg3-btn:hover,
.yg3-hub .yg3-card__actions a.yg3-btn:hover,
.yg3w-hub .yg3-card__actions .yg3-btn:hover,
.yg3w-hub .yg3-card__actions a.yg3-btn:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
}

/* Untouched heart overlay */
.yg3-hub .yg3-card__actions .yg3-sf-heart,
.yg3-hub .yg3-card .yg3-sf-heart,
.yg3w-hub .yg3-card__actions .yg3-sf-heart,
.yg3w-hub .yg3-card .yg3-sf-heart { font-size: inherit; line-height: inherit; }

/* ------------------------------------------------------------------
   ICON MODE: hide label text and draw glyph via ::after.
------------------------------------------------------------------- */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon],
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action],
.yg3-hub .yg3-card__actions .yg3-btn[data-do],
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon],
.yg3w-hub .yg3-card__actions [data-yg3w-open] {
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;
  background-image: none !important;
}

/* Suppress any legacy ::before while in icon-mode */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon]::before,
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action]::before,
.yg3-hub .yg3-card__actions .yg3-btn[data-do]::before,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon]::before,
.yg3w-hub .yg3-card__actions [data-yg3w-open]::before {
  content: none !important;
  background: none !important;
  background-image: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

/* Un-indent & reveal when real icon exists (JS sets .has-user-icon) */
.yg3-hub .yg3-card__actions .yg3-btn.has-user-icon,
.yg3-hub .yg3-card__actions .yg3-open-modal.has-user-icon,
.yg3-hub .yg3-card__actions a.yg3-btn.has-user-icon,
.yg3w-hub .yg3-card__actions .yg3-btn.has-user-icon,
.yg3w-hub .yg3-card__actions [data-yg3w-open].has-user-icon,
.yg3-btn.has-user-icon {
  text-indent: 0 !important;
  overflow: visible !important;
  background-image: none !important;
}

/* The icon glyph itself (inherits currentColor) */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon]::after,
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action]::after,
.yg3-hub .yg3-card__actions .yg3-btn[data-do]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon]::after,
.yg3w-hub .yg3-card__actions [data-yg3w-open]::after {
  content: "";
  width: var(--yg3-icon-size, 24px);
  height: var(--yg3-icon-size, 24px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: block;
  color: currentColor;
}

/* Tight contexts */
.yg3-hub .yg3-cards[data-cols="1"] .yg3-card__actions .yg3-btn[data-icon]::after,
.yg3-hub .yg3-cards.yg3-cards--list .yg3-card__actions .yg3-btn[data-icon]::after,
.yg3-hub .yg3-cards[data-cols="1"] .yg3-card__actions .yg3-open-modal[data-action]::after,
.yg3-hub .yg3-cards.yg3-cards--list .yg3-card__actions .yg3-open-modal[data-action]::after,
.yg3-hub .yg3-cards[data-cols="1"] .yg3-card__actions .yg3-btn[data-do]::after,
.yg3-hub .yg3-cards.yg3-cards--list .yg3-card__actions .yg3-btn[data-do]::after,
.yg3w-hub .yg3-cards[data-yg3w-cols="1"] .yg3-card__actions .yg3-btn[data-icon]::after,
.yg3w-hub .yg3-cards[data-yg3w-cols="1"] .yg3-card__actions [data-yg3w-open]::after {
  --yg3-icon-size: 22px;
}

/* RTL margin swap */
html[dir="rtl"] .yg3-hub .yg3-card__actions .yg3-btn,
html[dir="rtl"] .yg3w-hub .yg3-card__actions .yg3-btn { margin: 0 0 0 8px; }

/* Hide child nodes only when there is NO real icon */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon]:not(.has-user-icon) > *,
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action]:not(.has-user-icon) > *,
.yg3-hub .yg3-card__actions .yg3-btn[data-do]:not(.has-user-icon) > *,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon]:not(.has-user-icon) > *,
.yg3w-hub .yg3-card__actions [data-yg3w-open]:not(.has-user-icon) > * {
  display: none !important;
}

/* Force visible px-sized box for real icons */
.yg3-btn.has-user-icon .dashicons,
.yg3-btn.has-user-icon .yg3-ico {
  display: inline-block !important;
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  vertical-align: middle !important;
}
.yg3-btn.has-user-icon .dashicons::before {
  font-family: dashicons !important;
  font-size: 24px !important;
  line-height: 24px !important;
  width: 24px !important; height: 24px !important;
}

/* ===========================
   ICONS (data-icon mapping)
   =========================== */

/* VIEW (eye) */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="view"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="view"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="12" r="3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* WATCH (play) */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="watch"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="watch"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><polygon points="8,5 19,12 8,19"/></svg>');
}

/* DOWNLOAD */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="download"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="download"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><polyline points="7 10 12 15 17 10" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" y1="15" x2="12" y2="3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* PRINT */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="print"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="print"]::after,
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action="print"]::after { /* ✅ added this line */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M6 9V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><rect x="6" y="14" width="12" height="6" rx="1" ry="1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 14H5a3 3 0 0 1-3-3v-1a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v1a3 3 0 0 1 3 3h-1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="9" y1="17" x2="15" y2="17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* LINK (chain) */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="link"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="link"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M10.5 13.5a5 5 0 0 0 7.07 0l2.83-2.83a5 5 0 1 0-7.07-7.07L12 5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.5 10.5a5 5 0 0 0-7.07 0L3.6 13.33a5 5 0 1 0 7.07 7.07L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* ADD (plus) */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="add"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="add"]::after,
.yg3w-hub .yg3-card__actions [data-yg3w-open][data-mode="add"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M12 5v14M5 12h14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* EDIT / UPDATE */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="edit"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="edit"]::after,
.yg3w-hub .yg3-card__actions [data-yg3w-open][data-mode="edit"]::after,
.yg3w-hub .yg3-card__actions [data-yg3w-open][data-mode="update"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M12.1 5.1l6.8 6.8M3 21l2.6-.5a4 4 0 0 0 1.9-1L19 8.9a2.5 2.5 0 0 0 0-3.5l-.4-.4a2.5 2.5 0 0 0-3.5 0L3.6 15.6a4 4 0 0 0-1 1.9L2 20.9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* HISTORY */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="history"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="history"]::after,
.yg3w-hub .yg3-card__actions [data-yg3w-open][data-mode="history"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2"/><path d="M12 7v5l3 2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* GRAPH */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="graph"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="graph"]::after,
.yg3w-hub .yg3-card__actions [data-yg3w-open][data-mode="graph"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M4 19h16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><polyline points="4,14 9,9 13,12 20,5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* STATISTICS */
.yg3-hub .yg3-card__actions .yg3-btn[data-icon="statistics"]::after,
.yg3w-hub .yg3-card__actions .yg3-btn[data-icon="statistics"]::after,
.yg3w-hub .yg3-card__actions [data-yg3w-open][data-mode="statistics"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M4 20h16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><rect x="6" y="11" width="3" height="7" fill="currentColor"/><rect x="11" y="7" width="3" height="11" fill="currentColor"/><rect x="16" y="13" width="3" height="5" fill="currentColor"/></svg>');
}

/* ===========================
   FALLBACKS (no data-icon): element-agnostic
   =========================== */
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action="view"]::after,
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action="open"]::after { /* link-like viewers */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="12" r="3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.yg3-hub .yg3-card__actions .yg3-open-modal[data-action="watch"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><polygon points="8,5 19,12 8,19"/></svg>');
}

/* CHANGED: work on links OR buttons */
.yg3-hub .yg3-card__actions .yg3-btn[data-do="download"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><polyline points="7 10 12 15 17 10" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" y1="15" x2="12" y2="3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.yg3-hub .yg3-card__actions .yg3-btn[data-do="print"]::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M6 9V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><rect x="6" y="14" width="12" height="6" rx="1" ry="1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 14H5a3 3 0 0 1-3-3v-1a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v1a3 3 0 0 1 3 3h-1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="9" y1="17" x2="15" y2="17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* Compact cards */
.yg3-hub .yg3-card--compact .yg3-card__actions .yg3-btn,
.yg3w-hub .yg3-card--compact .yg3-card__actions .yg3-btn { width: 40px; height: 40px; }

/* ---------------------------------------
   Neutral inner icon baseline
----------------------------------------*/
.yg3-card__actions .yg3-btn,
.yg3-card__actions .yg3-btn .dashicons { color: #111; }
.yg3-card__actions .yg3-btn::before { color: currentColor; }
.yg3-card__actions .yg3-btn svg { fill: currentColor; }

.yg3-btn .dashicons,
.yg3-btn .yg3-ico {
  vertical-align: middle;
  margin-right: 0.35rem;
  line-height: 1;
  filter: none;
}
.yg3-btn .dashicons:first-child,
.yg3-btn .yg3-ico:first-child { margin-right: 0.35rem; }
.yg3-btn .dashicons:last-child,
.yg3-btn .yg3-ico:last-child  { margin-left: 0.35rem; }

/* Icon-only sizing (explicit) */
.yg3-btn.yg3-icon-only .dashicons,
.yg3-btn.yg3-icon-only .yg3-ico { width: 24px; height: 24px; line-height: 24px; }
.yg3-btn.yg3-icon-only .dashicons::before {
  font-family: dashicons;
  font-size: 24px;
  line-height: 24px;
  width: 24px; height: 24px;
}

/* Legacy suppression for real icons */
.yg3-btn.has-user-icon::before,
.yg3-btn.has-user-icon::after {
  content: none !important;
  background: none !important;
  background-image: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.yg3-btn.has-user-icon { background-image: none !important; }

/* End of file */
