/* Interpro Cookie Consent. Override the variables below in the theme to restyle. */
.ipt-cc-banner, .ipt-cc-modal, .ipt-cc-placeholder, .ipt-cc-policy {
	--ipt-cc-bg: #141414;
	--ipt-cc-surface: #1f1f1f;
	--ipt-cc-text: #ffffff;
	--ipt-cc-muted: #c4c4c4;
	--ipt-cc-line: rgba(255, 255, 255, .18);
	--ipt-cc-btn-bg: #ffffff;
	--ipt-cc-btn-text: #141414;
	--ipt-cc-focus: #ffffff;
	--ipt-cc-radius: 4px;
}

.ipt-cc-banner[hidden], .ipt-cc-modal[hidden] { display: none !important; }

/* Banner */
.ipt-cc-banner {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000;
	background: var(--ipt-cc-bg); color: var(--ipt-cc-text);
	border-top: 1px solid var(--ipt-cc-line);
	box-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
	padding: 18px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	font-size: 15px; line-height: 1.5;
}
.ipt-cc-banner__inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 20px 32px; align-items: center; flex-wrap: wrap; }
.ipt-cc-banner__text { flex: 1 1 420px; min-width: 0; }
.ipt-cc-banner__text p { margin: 0; color: var(--ipt-cc-muted); }
.ipt-cc-banner p.ipt-cc-banner__title { color: var(--ipt-cc-text); font-weight: 700; font-size: 17px; margin-bottom: 4px; letter-spacing: .02em; }
.ipt-cc-banner a, .ipt-cc-modal a { color: var(--ipt-cc-text); text-decoration: underline; text-underline-offset: 2px; }
.ipt-cc-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Buttons: Accept and Reject are deliberately the same style and size */
.ipt-cc-btn {
	font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .03em; line-height: 1.2;
	min-height: 44px; padding: 11px 18px; border-radius: var(--ipt-cc-radius); cursor: pointer;
	border: 1px solid var(--ipt-cc-btn-bg); background: var(--ipt-cc-btn-bg); color: var(--ipt-cc-btn-text);
	transition: opacity .15s;
}
.ipt-cc-btn:hover { opacity: .88; }
.ipt-cc-btn--outline { background: transparent; color: var(--ipt-cc-text); border-color: var(--ipt-cc-line); }
.ipt-cc-btn--link { background: none; border-color: transparent; color: var(--ipt-cc-text); text-decoration: underline; text-underline-offset: 3px; padding-inline: 8px; }
.ipt-cc-btn:focus-visible, .ipt-cc-modal__close:focus-visible, .ipt-cc-switch input:focus-visible + .ipt-cc-switch__ui {
	outline: 2px solid var(--ipt-cc-focus); outline-offset: 2px;
}

/* Settings dialog */
.ipt-cc-modal { position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 16px; }
.ipt-cc-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.ipt-cc-modal__dialog {
	position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
	background: var(--ipt-cc-bg); color: var(--ipt-cc-text); border: 1px solid var(--ipt-cc-line);
	border-radius: 8px; padding: 26px 24px 20px; font-size: 15px; line-height: 1.5;
}
.ipt-cc-modal__dialog:focus { outline: none; }
.ipt-cc-modal h2.ipt-cc-modal__title { color: var(--ipt-cc-text); font-size: 22px; margin: 0 0 8px; padding-right: 32px; }
.ipt-cc-modal p { color: var(--ipt-cc-muted); margin: 0 0 14px; }
.ipt-cc-modal__close {
	position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%;
	background: transparent; color: var(--ipt-cc-text); font-size: 28px; line-height: 1; cursor: pointer;
}
.ipt-cc-cats { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--ipt-cc-line); }
.ipt-cc-cat { padding: 14px 0; border-bottom: 1px solid var(--ipt-cc-line); margin: 0; }
.ipt-cc-modal p.ipt-cc-cat__desc { margin: 6px 0 0 58px; font-size: 14px; }
.ipt-cc-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; color: var(--ipt-cc-text); }
.ipt-cc-switch small { font-weight: 400; color: var(--ipt-cc-muted); }
.ipt-cc-switch input {
	position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important;
	margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0);
	-webkit-appearance: none; appearance: none; pointer-events: none;
}
.ipt-cc-switch input::before, .ipt-cc-switch input::after { display: none !important; content: none !important; }
.ipt-cc-switch { position: relative; }
.ipt-cc-switch__ui {
	flex: 0 0 46px; width: 46px; height: 26px; border-radius: 13px; background: #555; position: relative; transition: background .15s;
}
.ipt-cc-switch__ui::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s;
}
.ipt-cc-switch input:checked + .ipt-cc-switch__ui { background: #2e9d5b; }
.ipt-cc-switch input:checked + .ipt-cc-switch__ui::after { transform: translateX(20px); }
.ipt-cc-switch input:disabled + .ipt-cc-switch__ui { opacity: .6; }
.ipt-cc-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ipt-cc-modal__actions .ipt-cc-btn { flex: 1 1 150px; }
.ipt-cc-modal p.ipt-cc-modal__policy { margin: 14px 0 0; font-size: 14px; }

/* Blocked map/video placeholder */
.ipt-cc-placeholder {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
	background: var(--ipt-cc-surface); color: var(--ipt-cc-text); border: 1px dashed var(--ipt-cc-line);
	padding: 24px; width: 100%; height: 100%; box-sizing: border-box; font-size: 15px; line-height: 1.5;
}
.ipt-cc-placeholder p { margin: 0; max-width: 34ch; color: var(--ipt-cc-muted); }
.ipt-cc-placeholder__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ipt-cc-placeholder a.ipt-cc-btn { text-decoration: none; display: inline-flex; align-items: center; }
.ipt-cc-placeholder--image { background-size: cover; background-position: center; border: 0; }
.ipt-cc-placeholder--clean { padding: 0; }
.ipt-cc-placeholder--image p { color: #fff; font-weight: 500; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.ipt-cc-placeholder--image .ipt-cc-btn--outline { border-color: rgba(255, 255, 255, .8); color: #fff; background: rgba(0, 0, 0, .25); }

/* Policy page */
.ipt-cc-policy h2 { margin-top: 1.6em; }
.ipt-cc-policy h3 { margin-top: 1.3em; }
.ipt-cc-policy__updated { opacity: .8; }
.ipt-cc-policy .ipt-cc-btn { --ipt-cc-btn-bg: currentColor; }
.ipt-cc-policy .ipt-cc-open { background: transparent; color: inherit; border: 2px solid currentColor; }
.ipt-cc-table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.ipt-cc-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.ipt-cc-table th, .ipt-cc-table td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid rgba(127, 127, 127, .35); }
.ipt-cc-table th { font-weight: 700; }
.ipt-cc-table code { font-size: .92em; white-space: normal; word-break: break-word; background: none; padding: 0; }

@media (max-width: 640px) {
	.ipt-cc-banner { padding-top: 16px; font-size: 14px; }
	.ipt-cc-banner__actions { width: 100%; }
	.ipt-cc-banner__actions .ipt-cc-btn--primary { flex: 1 1 140px; }
	.ipt-cc-banner__actions .ipt-cc-btn--link { width: 100%; }
	.ipt-cc-modal p.ipt-cc-cat__desc { margin-left: 0; }
	/* Stack the cookie table as cards on phones */
	.ipt-cc-table thead { display: none; }
	.ipt-cc-table, .ipt-cc-table tbody, .ipt-cc-table tr, .ipt-cc-table td { display: block; width: 100%; }
	.ipt-cc-table tr { border: 1px solid rgba(127, 127, 127, .35); margin-bottom: 10px; }
	.ipt-cc-table td { border: 0; padding: 6px 12px; }
	.ipt-cc-table td::before { content: attr(data-label); display: block; font-weight: 700; font-size: .85em; opacity: .75; }
}
@media (prefers-reduced-motion: reduce) { .ipt-cc-btn, .ipt-cc-switch__ui, .ipt-cc-switch__ui::after { transition: none; } }
