/**
 * The gift card line in carts.
 *
 * Loaded site-wide (see DWGC_Public::enqueue_cart_item_styles()), so every
 * selector is scoped to this plugin's own classes: .dwgc-item-meta is the
 * details list from templates/cart-item-data.php, .dwgc-cart-item is added to
 * a gift card's row in the mini cart only.
 *
 * Colours are inherited rather than set, so the list follows whatever panel
 * or page it sits in; "muted" is an opacity for the same reason.
 */

/* ---------------------------------------------------------------------
 * Details list — "Amount: 50 €", "Recipient: Name (email)"
 * ------------------------------------------------------------------ */

.dwgc-item-meta {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	opacity: 0.72;
}

.dwgc-item-meta__row {
	margin: 0;
	padding: 0;
	/* An email address has no break points; without this it forces the
	   column wider than the drawer. */
	overflow-wrap: anywhere;
}

.dwgc-item-meta__row::before,
.dwgc-item-meta__row::marker {
	content: none;
}

/* ---------------------------------------------------------------------
 * Header mini cart (Druvo Motion Nav Header drawer)
 *
 * The drawer lays items out itself; these rules only adjust a gift card's
 * row, at the drawer's own selector depth so they apply over it:
 *
 *   [thumb]  Dāvanu karte              ×
 *            Summa: 50 €
 *            Saņēmējs: Name (email)
 *                               50,00 €
 * ------------------------------------------------------------------ */

.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .mini_cart_item.dwgc-cart-item {
	grid-template-columns: var(--dweb-nh-minicart-thumb, 64px) minmax(0, 1fr) auto;
	grid-template-areas:
		"thumb title remove"
		"thumb price price";
	align-items: start;
}

.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .dwgc-cart-item .bde-mini-cart-item-title,
.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .dwgc-cart-item .bde-mini-cart-item-title:hover {
	grid-area: title;
	align-self: start;
	min-width: 0;
	text-decoration: none;
}

/* Only the name is a link, underlined on hover and keyboard focus only. */
.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .dwgc-cart-item .dwgc-cart-item__title {
	color: inherit;
	text-decoration: none;
}

.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .dwgc-cart-item .dwgc-cart-item__title:hover,
.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .dwgc-cart-item .dwgc-cart-item__title:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* × sits top-right, inside the panel, its glyph lined up with the content
   edge rather than its 28px hit area. */
.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .dwgc-cart-item .remove {
	align-self: start;
	margin: -4px -8px 0 0;
}

.breakdance .dweb-nav-header .dweb-nav-header__minicart-content .dwgc-cart-item .dwgc-cart-item__price {
	grid-area: price;
	justify-self: end;
	white-space: nowrap;
}
