/**
 * Product Update Notify - front-end styles.
 *
 * Covers the single-product envelope toggle widget and the "Update
 * Notifications" table on the My Account page.
 *
 * @package GPLCMN_Plugin
 */

/* ---------------------------------------------------------------------
 * Single product page: envelope toggle widget
 * ------------------------------------------------------------------ */

.gplcmn-widget {
	margin: 1em 0;
}

.gplcmn-envelope {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: none;
	border: 1px solid #ccc;
	border-radius: 999px;
	padding: 0.45em 1em;
	cursor: pointer;
	font-size: 0.9em;
	line-height: 1.2;
	color: #555;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.gplcmn-envelope:hover,
.gplcmn-envelope:focus-visible {
	border-color: #888;
	color: #333;
}

.gplcmn-envelope-icon {
	flex: 0 0 auto;
	transition: color 0.15s ease, transform 0.15s ease;
}

/* Active / subscribed state: the envelope fills with the theme's link
 * color (falls back to a WooCommerce-ish purple/blue if not defined). */
.gplcmn-envelope-toggle.is-subscribed {
	color: #fff;
	background-color: var( --gplcmn-accent-color, #7f54b3 );
	border-color: var( --gplcmn-accent-color, #7f54b3 );
}

.gplcmn-envelope-toggle.is-subscribed .gplcmn-envelope-icon {
	transform: scale( 1.05 );
}

.gplcmn-envelope-guest {
	opacity: 0.85;
}

.gplcmn-envelope-status {
	display: block;
	margin-top: 0.4em;
	font-size: 0.85em;
	color: #2a7a2a;
}

/* ---------------------------------------------------------------------
 * My Account: "Update Notifications" tab
 * ------------------------------------------------------------------ */

.gplcmn-account-intro {
	margin-bottom: 1em;
}

.gplcmn-account-empty {
	color: #666;
}

.gplcmn-account-table {
	width: 100%;
	border-collapse: collapse;
}

.gplcmn-account-table th,
.gplcmn-account-table td {
	text-align: left;
	padding: 0.75em 0.5em;
	vertical-align: middle;
}

.gplcmn-col-actions {
	white-space: nowrap;
	text-align: right;
}

.gplcmn-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	margin-left: 0.25em;
	border: none;
	background: none;
	border-radius: 4px;
	color: #555;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gplcmn-action:hover,
.gplcmn-action:focus-visible {
	background-color: rgba( 0, 0, 0, 0.06 );
	color: #222;
}

.gplcmn-action-remove:hover,
.gplcmn-action-remove:focus-visible {
	color: #b32d2e;
}

.gplcmn-account-table tr.gplcmn-row-removing {
	opacity: 0.4;
	pointer-events: none;
}
