/* Visitor Intelligence — cookie notice and preferences. Colours can be overridden with the --vi-* variables. */
.vi-banner, .vi-modal {
	--vi-ink: #0e0e0e;
	--vi-paper: #fff;
	--vi-soft: #f3f3f1;
	--vi-line: rgba(14, 14, 14, .12);
	--vi-muted: rgba(14, 14, 14, .66);
}

/* Notice */
.vi-banner {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 1000001;
	width: min(460px, calc(100vw - 32px));
	padding: 22px 22px 18px;
	border-radius: 18px;
	background: var(--vi-paper);
	color: var(--vi-ink);
	border: 1px solid var(--vi-line);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
	font-size: 14px;
	line-height: 1.55;
}
.vi-banner p { margin: 0; }
.vi-banner-title { font-weight: 700; font-size: 16px; margin-bottom: 6px !important; letter-spacing: -.01em; }
.vi-banner-text { color: var(--vi-muted); }
.vi-policy-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 13px; }
.vi-policy-links a { color: var(--vi-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(14, 14, 14, .35); }
.vi-policy-links a:hover { text-decoration-color: currentColor; }
.vi-banner-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }

.vi-btn {
	border: 1.5px solid var(--vi-ink);
	border-radius: 999px;
	padding: 10px 14px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	background: transparent;
	color: var(--vi-ink);
	white-space: nowrap;
}
.vi-btn:hover { background: var(--vi-soft); }
.vi-btn-solid, .vi-btn-dark { background: var(--vi-ink); color: #fff; }
.vi-btn-solid:hover, .vi-btn-dark:hover { background: #2a2a2a; }
.vi-btn:focus-visible, .vi-modal-x:focus-visible, .vi-switch input:focus-visible + .vi-switch-ui, .vi-cat-details summary:focus-visible { outline: 2px solid var(--vi-ink); outline-offset: 2px; }

/* Preferences panel */
html.vi-modal-open { overflow: hidden; }
.vi-modal {
	position: fixed;
	inset: 0;
	z-index: 1000002;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(14, 14, 14, .55);
	color: var(--vi-ink);
	font-size: 14px;
	line-height: 1.55;
}
.vi-modal-box {
	display: flex;
	flex-direction: column;
	width: min(640px, 100%);
	max-height: min(760px, calc(100vh - 40px));
	max-height: min(760px, calc(100dvh - 40px));
	background: var(--vi-paper);
	border-radius: 20px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
	overflow: hidden;
}
.vi-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--vi-line); }
.vi-modal-head h2 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.01em; color: var(--vi-ink); }
.vi-modal-x { border: 0; background: transparent; color: var(--vi-ink); cursor: pointer; padding: 6px; border-radius: 8px; }
.vi-modal-x:hover { background: var(--vi-soft); }
.vi-modal-body { overflow-y: auto; padding: 18px 24px 8px; }
.vi-modal-intro { margin: 0; color: var(--vi-muted); }
.vi-modal-body .vi-policy-links { margin: 8px 0 6px; }
.vi-cat { border-top: 1px solid var(--vi-line); padding: 16px 0; }
.vi-cat:first-of-type { margin-top: 12px; }
.vi-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vi-cat h3 { margin: 0; font-size: 15.5px; line-height: 1.3; color: var(--vi-ink); }
.vi-cat-text { margin: 6px 0 0; color: var(--vi-muted); }
.vi-cat-note { margin: 6px 0 0; font-size: 13px; font-style: italic; color: var(--vi-muted); }
.vi-cat-note:empty { display: none; }
.vi-always { font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--vi-muted); }

/* Switch */
.vi-switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.vi-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vi-switch-ui { width: 44px; height: 26px; border-radius: 999px; background: #c9c9c4; position: relative; transition: background .15s; }
.vi-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.vi-switch input:checked + .vi-switch-ui { background: var(--vi-ink); }
.vi-switch input:checked + .vi-switch-ui::after { transform: translateX(18px); }
.vi-switch input:disabled + .vi-switch-ui { opacity: .45; cursor: not-allowed; }

/* Cookie details */
.vi-cat-details { margin-top: 10px; }
.vi-cat-details summary { cursor: pointer; font-size: 13px; font-weight: 600; width: fit-content; }
.vi-table-wrap { overflow-x: auto; margin-top: 8px; }
.vi-cookie-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.vi-cookie-table th, .vi-cookie-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--vi-line, rgba(14, 14, 14, .12)); }
.vi-cookie-table th { font-weight: 600; background: var(--vi-soft, #f3f3f1); white-space: nowrap; }
.vi-cookie-table code { font-size: 12px; background: none; padding: 0; overflow-wrap: anywhere; }
.vi-cookie-table th:nth-child(1) { width: 24%; }
.vi-cookie-table th:nth-child(2) { width: 18%; }
.vi-cookie-table th:nth-child(4) { width: 15%; }
.vi-modal-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 24px; border-top: 1px solid var(--vi-line); background: var(--vi-paper); }

@media (max-width: 560px) {
	.vi-banner { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 18px 16px 14px; }
	.vi-banner-actions { grid-template-columns: 1fr 1fr; }
	.vi-banner-actions .vi-btn-solid { grid-column: 1 / -1; order: -1; }
	.vi-modal { padding: 0; align-items: flex-end; }
	.vi-modal-box { border-radius: 20px 20px 0 0; max-height: 92vh; max-height: 92dvh; }
	.vi-modal-head, .vi-modal-body, .vi-modal-foot { padding-left: 18px; padding-right: 18px; }
	.vi-modal-foot { grid-template-columns: 1fr 1fr; }
	.vi-modal-foot .vi-btn-dark { grid-column: 1 / -1; order: -1; }
}

/* Cookie Policy page */
.vi-cookie-cat { margin-top: 28px; }
.vi-cookie-table { margin-bottom: 8px; }

/* Footer links fallback for themes without a legal-links spot. */
.vi-legal { padding: 14px 16px; text-align: center; font-size: 13px; }

/* "Do not sell or share" page */
.vi-choices-status { font-weight: 600; }
.vi-choices p:has(.vi-choice-btn) { display: flex; flex-wrap: wrap; gap: 10px; }
.vi-choice-btn { border: 1.5px solid currentColor; border-radius: 999px; padding: 13px 24px; font: inherit; font-weight: 600; background: transparent; color: inherit; cursor: pointer; }
.vi-choice-primary { background: #0e0e0e; border-color: #0e0e0e; color: #fff; }
.vi-choice-btn:focus-visible { outline: 2px solid #0e0e0e; outline-offset: 2px; }
