/* ══════════════════════════════════════════════════════════════
   DRUGZ — Widget d'abonnement aux notifications (opt-in 4 sujets)
   Utilisé sur /reglages. Variables de thème avec valeurs de repli pour
   rester lisible quelle que soit la feuille de style de la page.
   ══════════════════════════════════════════════════════════════ */

.notif-widget {
	--nw-accent: var(--accent, #22D3EE);
	--nw-card:   var(--bg-card, #07070f);
	--nw-border: var(--border, rgba(255, 255, 255, 0.12));
	--nw-text:   var(--text-mid, rgba(255, 255, 255, 0.82));
	--nw-dim:    var(--text-lo, rgba(255, 255, 255, 0.58));
	max-width: 620px;
	margin: 24px 0;
	font-family: 'Exo 2', sans-serif;
}

.notif-widget[hidden] { display: none; }

/* État global / message */
.notif-widget .nw-status {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--nw-dim);
	margin-bottom: 18px;
	line-height: 1.5;
}
.notif-widget .nw-dot {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--nw-dim); flex-shrink: 0;
	box-shadow: 0 0 0 0 transparent;
	transition: background .2s, box-shadow .2s;
}
.notif-widget[data-state="on"] .nw-dot {
	background: var(--nw-accent);
	box-shadow: 0 0 10px color-mix(in srgb, var(--nw-accent) 60%, transparent);
}

/* Liste des sujets */
.notif-widget .nw-topics {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: grid;
	gap: 10px;
}
.notif-widget .nw-topic {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 13px 16px;
	background: color-mix(in srgb, var(--nw-card) 70%, transparent);
	border: 1px solid var(--nw-border);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .18s, background .18s;
}
.notif-widget .nw-topic:hover {
	border-color: color-mix(in srgb, var(--nw-accent) 45%, transparent);
}
.notif-widget .nw-topic input {
	appearance: none;
	-webkit-appearance: none;
	width: 20px; height: 20px;
	margin: 0; flex-shrink: 0;
	border: 1.5px solid var(--nw-border);
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
	position: relative;
	transition: border-color .15s, background .15s;
}
.notif-widget .nw-topic input:checked {
	background: var(--nw-accent);
	border-color: var(--nw-accent);
}
.notif-widget .nw-topic input:checked::after {
	content: '';
	position: absolute;
	left: 6px; top: 2px;
	width: 5px; height: 10px;
	border: solid #04060a;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.notif-widget .nw-topic input:focus-visible {
	outline: 2px solid var(--nw-accent);
	outline-offset: 2px;
}
.notif-widget .nw-topic-label {
	font-size: 14.5px;
	color: var(--nw-text);
	letter-spacing: .01em;
}

/* Actions */
.notif-widget .nw-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}
.notif-widget .nw-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 11px 20px;
	background: var(--nw-accent);
	border: 1px solid var(--nw-accent);
	border-radius: 8px;
	color: #04060a;
	font-family: 'Share Tech Mono', monospace;
	font-size: 12.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity .18s, box-shadow .18s;
}
.notif-widget .nw-btn:hover:not([disabled]) {
	box-shadow: 0 0 16px color-mix(in srgb, var(--nw-accent) 35%, transparent);
}
.notif-widget .nw-btn[disabled] { opacity: .4; cursor: default; }
.notif-widget .nw-btn svg { width: 16px; height: 16px; }

.notif-widget .nw-off {
	background: transparent;
	border: 1px solid var(--nw-border);
	color: var(--nw-dim);
	padding: 11px 18px;
	border-radius: 8px;
	font-family: 'Share Tech Mono', monospace;
	font-size: 12px;
	letter-spacing: .05em;
	cursor: pointer;
	transition: color .18s, border-color .18s;
}
.notif-widget .nw-off:hover { color: #fff; border-color: var(--nw-dim); }
.notif-widget .nw-off[hidden] { display: none; }

/* Aide / messages contextuels */
.notif-widget .nw-hint {
	margin-top: 16px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--nw-dim);
	max-width: 540px;
}
.notif-widget .nw-hint[hidden] { display: none; }
.notif-widget .nw-hint.error { color: #ff8a8a; }
.notif-widget .nw-hint.ok    { color: var(--nw-accent); }
