/**
 * Doktor Onay — frontend styles.
 *
 * Design language derived from hairtec.nl: deep navy accent (#223558),
 * white cards with a hairline #e3e5eb border, gray #5c5c5c labels over
 * near-black #231f20 values. Typography is inherited from the active theme
 * so the components always blend in (Europa on hairtec.nl, the site's own
 * font elsewhere).
 *
 * The verified mark is an "ink wash": a soft tint resting on the text
 * baseline that follows the words line by line, closed by a scalloped
 * rosette seal — the universally recognised "verified" badge shape. On
 * hover the wash deepens and the seal pops slightly.
 *
 * All accent colouring flows through the --dokay-color custom property
 * (default #223558), which the plugin overrides via an inline style on
 * :root when a custom colour is set.
 *
 * Mark style variants and the icon toggle are driven by body classes added
 * by Dokay_Frontend: dokay-style-{wash|dotted|dashed|solid|highlight|none},
 * dokay-icons-{on|off} and dokay-show-pending.
 *
 * @package Doktor_Onay
 */

:root {
	--dokay-color: #223558;
}

/*
 * Registered so the wash colour animates smoothly on hover in supporting
 * browsers; elsewhere the colour simply swaps without a transition.
 */
@property --dokay-wash {
	syntax: '<color>';
	inherits: false;
	initial-value: rgba(34, 53, 88, 0.09);
}

/* ----------------------------------------------------------------------
 * Inline marks
 * ------------------------------------------------------------------- */

.dokay-mark--verified {
	cursor: help;
	border-radius: 3px;
	padding: 0 2px;
	margin: 0 -2px;
	/* Wash and radius follow each wrapped line fragment individually. */
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Default variant: the ink wash on the baseline. */
body.dokay-style-wash .dokay-mark--verified {
	--dokay-wash: rgba(34, 53, 88, 0.09);
	--dokay-wash: color-mix(in srgb, var(--dokay-color) 9%, transparent);
	background-image: linear-gradient(transparent 62%, var(--dokay-wash) 62%);
	transition: --dokay-wash 180ms ease;
}

body.dokay-style-wash .dokay-mark--verified:hover,
body.dokay-style-wash .dokay-mark--verified:focus-visible {
	--dokay-wash: rgba(34, 53, 88, 0.22);
	--dokay-wash: color-mix(in srgb, var(--dokay-color) 22%, transparent);
}

/* Quiet underline variants. */
body.dokay-style-dotted .dokay-mark--verified,
body.dokay-style-dashed .dokay-mark--verified,
body.dokay-style-solid .dokay-mark--verified {
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	text-decoration-color: rgba(34, 53, 88, 0.45);
	text-decoration-color: color-mix(in srgb, var(--dokay-color) 45%, transparent);
}

body.dokay-style-dotted .dokay-mark--verified {
	text-decoration-style: dotted;
}

body.dokay-style-dashed .dokay-mark--verified {
	text-decoration-style: dashed;
}

body.dokay-style-solid .dokay-mark--verified {
	text-decoration-style: solid;
}

/* Full-height tint block. */
body.dokay-style-highlight .dokay-mark--verified {
	background: rgba(34, 53, 88, 0.07);
	background: color-mix(in srgb, var(--dokay-color) 7%, transparent);
	transition: background-color 180ms ease;
}

body.dokay-style-highlight .dokay-mark--verified:hover,
body.dokay-style-highlight .dokay-mark--verified:focus-visible {
	background: rgba(34, 53, 88, 0.14);
	background: color-mix(in srgb, var(--dokay-color) 14%, transparent);
}

/*
 * Rosette seal at the end of the sentence (only when icons are enabled) —
 * the scalloped "verified" badge shape readers already know.
 */
body.dokay-icons-on .dokay-mark--verified::after {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-left: 4px;
	vertical-align: -0.12em;
	background-color: var(--dokay-color);
	transition: transform 180ms ease;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23 12l-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69l-3.61.81.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69L23 12zm-12.91 4.72l-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48-7.33 7.35z'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23 12l-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69l-3.61.81.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69L23 12zm-12.91 4.72l-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48-7.33 7.35z'/%3E%3C/svg%3E");
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
}

body.dokay-icons-on .dokay-mark--verified:hover::after,
body.dokay-icons-on .dokay-mark--verified:focus-visible::after {
	transform: scale(1.18) rotate(6deg);
}

/* Browsers without CSS masks would show a plain square — hide instead. */
@supports not ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
	body.dokay-icons-on .dokay-mark--verified::after {
		display: none;
	}
}

.dokay-mark--verified:focus-visible {
	outline: 2px solid var(--dokay-color);
	outline-offset: 2px;
}

/*
 * Pending / stale marks are completely neutral by default
 * (hide_unverified = true: they render as plain text).
 */
.dokay-mark--pending {
	text-decoration: none;
	background: transparent;
}

/* hide_unverified = false: subtle gray dotted underline, never a seal. */
body.dokay-show-pending .dokay-mark--pending {
	text-decoration: underline dotted rgba(0, 0, 0, 0.35);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/*
 * The verification note ("Screen reader text" setting) is printed once per
 * page as a hidden footer element (#dokay-sr-note) that verified marks
 * reference via aria-describedby — announced by AT via the reference, never
 * rendered, and invisible to crawlers as indexable text. The `hidden`
 * attribute needs no CSS support.
 */

/* ----------------------------------------------------------------------
 * Review line — the visible, crawlable "medically reviewed" note above
 * the content of verified posts.
 * ------------------------------------------------------------------- */

.dokay-review-line {
	display: flex;
	align-items: baseline;
	gap: 7px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #5c5c5c;
}

.dokay-review-line--top {
	margin: 0 0 1.5em;
}

/* End-of-article placement (default): a quiet note behind a hairline rule. */
.dokay-review-line--bottom {
	margin: 2em 0 0;
	padding-top: 14px;
	border-top: 1px solid #eeeff2;
}

.dokay-review-line__badge {
	flex: none;
	width: 13px;
	height: 13px;
	align-self: center;
	background-color: var(--dokay-color);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23 12l-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69l-3.61.81.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69L23 12zm-12.91 4.72l-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48-7.33 7.35z'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23 12l-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69l-3.61.81.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69L23 12zm-12.91 4.72l-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48-7.33 7.35z'/%3E%3C/svg%3E");
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
}

@supports not ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
	.dokay-review-line__badge {
		display: none;
	}
}

.dokay-review-line strong {
	color: var(--dokay-color);
	font-weight: 700;
}

.dokay-review-line a {
	color: var(--dokay-color);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(34, 53, 88, 0.3);
	text-decoration-color: color-mix(in srgb, var(--dokay-color) 30%, transparent);
	transition: text-decoration-color 120ms ease;
}

.dokay-review-line a:hover,
.dokay-review-line a:focus-visible {
	text-decoration-color: var(--dokay-color);
}

/* ----------------------------------------------------------------------
 * Tooltip
 *
 * A plain white note: hairline border in the site's card gray (#e3e5eb),
 * a soft radius, a faint lift. No arrow — the note simply sits next to the
 * sentence it belongs to.
 * ------------------------------------------------------------------- */

.dokay-tooltip {
	position: absolute;
	z-index: 99999;
	max-width: 280px;
	box-sizing: border-box;
	background: #fff;
	color: #231f20;
	border: 1px solid #e3e5eb;
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(34, 53, 88, 0.1);
	padding: 12px 14px;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	opacity: 0;
	transition: opacity 120ms ease;
}

.dokay-tooltip.is-visible {
	opacity: 1;
}

.dokay-tooltip[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.dokay-tooltip,
	.dokay-mark--verified,
	.dokay-mark--verified::after {
		transition: none !important;
		transform: none !important;
	}
}

/* ----------------------------------------------------------------------
 * Reviewer card (inside the tooltip)
 *
 * Label / value, exactly like the review card the site already shows on
 * its articles: a small gray label, the name in near-black semibold, one
 * muted detail line. Nothing else.
 * ------------------------------------------------------------------- */

.dokay-card {
	display: flex;
	align-items: center;
	gap: 10px;
}

.dokay-card p {
	margin: 0;
}

.dokay-card__body {
	min-width: 0;
}

/* Photo only when the reviewer actually has one — no placeholder blocks. */
.dokay-card__photo {
	display: block;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: cover;
}

.dokay-card__label {
	font-size: 12px;
	line-height: 1.3;
	color: #5c5c5c;
}

.dokay-card__name {
	margin-top: 2px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #231f20;
}

.dokay-card__name a {
	color: inherit;
	font: inherit;
	text-decoration: none;
}

.dokay-card__name a:hover,
.dokay-card__name a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.dokay-card__byline {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.4;
	color: #5c5c5c;
}

.dokay-card__byline strong {
	font-weight: inherit;
	color: inherit;
}

.dokay-card__dot {
	margin: 0 2px;
	color: #b9bdc9;
}

.dokay-card__policy {
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.3;
}

.dokay-card__policy a {
	color: #5c5c5c;
	font: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: #b9bdc9;
}

.dokay-card__policy a:hover,
.dokay-card__policy a:focus-visible {
	color: #231f20;
	text-decoration-color: currentColor;
}

.dokay-card a:focus-visible {
	outline: 2px solid var(--dokay-color);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ----------------------------------------------------------------------
 * Print
 * ------------------------------------------------------------------- */

@media print {
	.dokay-tooltip {
		display: none !important;
	}
}
