/* WMC Cookie Manager - banner styles */
#wmc-cm,
#wmc-cm *,
#wmc-cm *::before,
#wmc-cm *::after { box-sizing: border-box; }

#wmc-cm {
	font-family: var(--wmc-font, inherit);
	font-size: 15px;
	line-height: 1.5;
	color: var(--wmc-text);
	position: relative;
	z-index: var(--wmc-z, 999999);
	-webkit-font-smoothing: antialiased;
}
#wmc-cm[hidden] { display: none !important; }
#wmc-cm [hidden] { display: none !important; }
#wmc-cm p { margin: 0 0 .75em; }
#wmc-cm p:last-child { margin-bottom: 0; }
#wmc-cm a { color: var(--wmc-link); text-decoration: underline; }
#wmc-cm h2 { margin: 0; padding: 0; font-weight: 600; color: inherit; line-height: 1.3; }
#wmc-cm button { font: inherit; cursor: pointer; }
#wmc-cm code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: transparent; padding: 0; color: inherit; }

html.wmc-cm-lock { overflow: hidden; }

/* Overlay */
.wmc-cm-overlay {
	position: fixed; inset: 0;
	background: var(--wmc-overlay);
	z-index: 1;
	animation: wmc-cm-fade .25s ease;
}

/* Notice */
.wmc-cm-notice {
	position: fixed;
	z-index: 3;
	background: var(--wmc-bg);
	color: var(--wmc-text);
	border: 1px solid var(--wmc-border);
	border-radius: var(--wmc-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
	max-width: 440px;
	width: calc(100% - 32px);
	outline: none;
}
.wmc-cm-notice__inner { position: relative; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.wmc-cm-notice__content { display: flex; flex-direction: column; gap: 8px; }
.wmc-cm-title { font-size: 17px; }
.wmc-cm-desc { font-size: 14px; }
.wmc-cm-logo img { max-height: 40px; width: auto; display: block; }
.wmc-cm-close {
	position: absolute; top: 10px; right: 10px;
	width: 32px; height: 32px; padding: 0;
	border: 0; background: transparent; color: inherit;
	border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; opacity: .75;
}
.wmc-cm-close:hover, .wmc-cm-close:focus-visible { opacity: 1; background: rgba(127, 127, 127, .15); }
[dir="rtl"] .wmc-cm-close { right: auto; left: 10px; }

.wmc-cm-pos-bottom-left { bottom: 16px; left: 16px; }
.wmc-cm-pos-bottom-right { bottom: 16px; right: 16px; }
.wmc-cm-pos-top-left { top: 16px; left: 16px; }
.wmc-cm-pos-top-right { top: 16px; right: 16px; }
.wmc-cm-pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 520px; }

/* Bar layout */
.wmc-cm-notice--bar {
	max-width: none; width: 100%; left: 0; right: 0;
	border-radius: 0; border-left: 0; border-right: 0;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
}
.wmc-cm-notice--bar.wmc-cm-pos-bottom, .wmc-cm-notice--bar.wmc-cm-pos-bottom-left, .wmc-cm-notice--bar.wmc-cm-pos-bottom-right { bottom: 0; top: auto; }
.wmc-cm-notice--bar.wmc-cm-pos-top, .wmc-cm-notice--bar.wmc-cm-pos-top-left, .wmc-cm-notice--bar.wmc-cm-pos-top-right { top: 0; bottom: auto; }
.wmc-cm-notice--bar .wmc-cm-notice__inner { flex-direction: row; align-items: center; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 18px 56px 18px 24px; }
.wmc-cm-notice--bar .wmc-cm-notice__content { flex: 1 1 auto; }
.wmc-cm-notice--bar .wmc-cm-actions { flex: 0 0 auto; }

/* Popup layout */
.wmc-cm-notice--popup { z-index: 3; }

/* Buttons */
.wmc-cm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wmc-cm-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 40px; padding: 8px 18px;
	border-radius: calc(var(--wmc-radius) * .75);
	border: 1px solid var(--wmc-accent);
	font-size: 14px; font-weight: 600; line-height: 1.2;
	text-decoration: none; transition: filter .15s ease, background-color .15s ease;
	flex: 1 1 auto;
}
.wmc-cm-btn--primary { background: var(--wmc-accent); color: var(--wmc-accent-txt); }
.wmc-cm-btn--secondary { background: transparent; color: var(--wmc-secondary); border-color: var(--wmc-secondary); }
.wmc-cm-btn:hover { filter: brightness(.92); }
.wmc-cm-btn:focus-visible, .wmc-cm-close:focus-visible, .wmc-cm-cat__expand:focus-visible, .wmc-cm-switch input:focus-visible + .wmc-cm-switch__track, .wmc-cm-revisit:focus-visible { outline: 2px solid var(--wmc-accent); outline-offset: 2px; }
.wmc-cm-notice--bar .wmc-cm-btn { flex: 0 0 auto; }

/* Modal / preference center */
.wmc-cm-modal { position: fixed; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 16px; }
.wmc-cm-modal[hidden] { display: none !important; }
.wmc-cm-pref {
	background: var(--wmc-bg); color: var(--wmc-text);
	border-radius: var(--wmc-radius); border: 1px solid var(--wmc-border);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	width: 100%; max-width: 640px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	display: flex; flex-direction: column; overflow: hidden; outline: none;
	animation: wmc-cm-pop .22s ease;
}
.wmc-cm-pref__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--wmc-border); }
.wmc-cm-pref__header .wmc-cm-close { position: static; }
.wmc-cm-pref__title { font-size: 18px; }
.wmc-cm-pref__body { overflow-y: auto; padding: 18px 22px; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.wmc-cm-pref__desc { font-size: 14px; margin-bottom: 16px; }
.wmc-cm-pref__footer { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--wmc-border); background: var(--wmc-bg); }
.wmc-cm-pref__footer .wmc-cm-btn { flex: 1 1 140px; }

/* Sidebar preference center */
.wmc-cm-modal--sidebar-left, .wmc-cm-modal--sidebar-right { padding: 0; align-items: stretch; }
.wmc-cm-modal--sidebar-left { justify-content: flex-start; }
.wmc-cm-modal--sidebar-right { justify-content: flex-end; }
.wmc-cm-modal--sidebar-left .wmc-cm-pref, .wmc-cm-modal--sidebar-right .wmc-cm-pref { max-height: none; height: 100%; max-width: 480px; border-radius: 0; animation: wmc-cm-slide-right .25s ease; }
.wmc-cm-modal--sidebar-left .wmc-cm-pref { animation-name: wmc-cm-slide-left; }

/* Categories accordion */
.wmc-cm-categories { display: flex; flex-direction: column; gap: 10px; }
.wmc-cm-cat { border: 1px solid var(--wmc-border); border-radius: calc(var(--wmc-radius) * .75); overflow: hidden; }
.wmc-cm-cat__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.wmc-cm-cat__expand {
	flex: 1 1 auto; display: flex; align-items: center; gap: 8px; text-align: left;
	background: transparent; border: 0; padding: 4px 0; color: inherit; font-weight: 600; font-size: 15px;
}
[dir="rtl"] .wmc-cm-cat__expand { text-align: right; }
.wmc-cm-cat__chevron { display: inline-flex; transition: transform .2s ease; opacity: .7; }
.wmc-cm-cat.is-open .wmc-cm-cat__chevron { transform: rotate(180deg); }
.wmc-cm-cat__count { font-weight: 400; font-size: 13px; opacity: .7; }
.wmc-cm-cat__body { padding: 0 14px 14px 36px; font-size: 14px; }
[dir="rtl"] .wmc-cm-cat__body { padding: 0 36px 14px 14px; }
.wmc-cm-cat__desc { margin-bottom: 10px; }
.wmc-cm-always { font-size: 13px; font-weight: 600; color: var(--wmc-toggle-on); white-space: nowrap; }
.wmc-cm-empty { font-size: 13px; opacity: .75; }

/* Switch */
.wmc-cm-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.wmc-cm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; overflow: hidden; }
.wmc-cm-switch__track { width: 44px; height: 24px; border-radius: 24px; background: var(--wmc-toggle-off); position: relative; transition: background-color .2s ease; display: block; }
.wmc-cm-switch__thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s ease; }
.wmc-cm-switch input:checked + .wmc-cm-switch__track { background: var(--wmc-toggle-on); }
.wmc-cm-switch input:checked + .wmc-cm-switch__track .wmc-cm-switch__thumb { transform: translateX(20px); }
[dir="rtl"] .wmc-cm-switch__thumb { left: auto; right: 3px; }
[dir="rtl"] .wmc-cm-switch input:checked + .wmc-cm-switch__track .wmc-cm-switch__thumb { transform: translateX(-20px); }

/* Audit table */
.wmc-cm-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; }
.wmc-cm-table th, .wmc-cm-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--wmc-border); }
[dir="rtl"] .wmc-cm-table th, [dir="rtl"] .wmc-cm-table td { text-align: right; }
.wmc-cm-table th { font-weight: 600; background: rgba(127, 127, 127, .08); }
.wmc-cm-table tr:last-child td { border-bottom: 0; }
.wmc-cm-table__provider { display: block; font-size: 12px; opacity: .7; }
.wmc-cm-table td:first-child { word-break: break-all; min-width: 110px; }

/* Revisit button */
.wmc-cm-revisit {
	position: fixed; bottom: 16px; z-index: 2;
	width: 48px; height: 48px; border-radius: 50%; border: 0;
	background: var(--wmc-accent); color: var(--wmc-accent-txt);
	display: inline-flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transition: transform .15s ease;
}
.wmc-cm-revisit:hover { transform: scale(1.06); }
.wmc-cm-revisit--bottom-left { left: 16px; }
.wmc-cm-revisit--bottom-right { right: 16px; }

/* Placeholder for blocked iframes */
.wmc-cm-placeholder {
	display: flex; align-items: center; justify-content: center; text-align: center;
	background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M0 0h20v20H0zM20 20h20v20H20z' fill='%23191919'/%3E%3C/svg%3E");
	color: #fff; border-radius: 6px; padding: 24px; margin: 8px 0; font-size: 14px; max-width: 100%; box-sizing: border-box;
}
.wmc-cm-placeholder__inner { display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 420px; }
.wmc-cm-placeholder .wmc-cm-btn { flex: 0 0 auto; }
.wmc-cm-placeholder p { margin: 0; }

/* Shortcode policy table */
.wmc-cm-policy__category { margin-bottom: 28px; }
.wmc-cm-policy .wmc-cm-table { font-size: 14px; }
.wmc-cm-status { font-size: .9em; opacity: .85; }

/* Animations */
@keyframes wmc-cm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wmc-cm-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes wmc-cm-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes wmc-cm-rise-center { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes wmc-cm-slide-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes wmc-cm-slide-left { from { transform: translateX(-100%); } to { transform: none; } }
.wmc-cm--animate .wmc-cm-notice { animation: wmc-cm-rise .3s ease; }
.wmc-cm--animate .wmc-cm-notice.wmc-cm-pos-center { animation: wmc-cm-rise-center .3s ease; }
@media (prefers-reduced-motion: reduce) {
	#wmc-cm * { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 640px) {
	.wmc-cm-notice { max-width: none; width: calc(100% - 16px); left: 8px !important; right: 8px !important; bottom: 8px; top: auto; transform: none; }
	.wmc-cm-notice.wmc-cm-pos-top-left, .wmc-cm-notice.wmc-cm-pos-top-right, .wmc-cm-notice.wmc-cm-pos-top { top: 8px; bottom: auto; }
	.wmc-cm-notice.wmc-cm-pos-center { top: auto; bottom: 8px; }
	.wmc-cm-notice--bar { width: 100%; left: 0 !important; right: 0 !important; bottom: 0; }
	.wmc-cm-notice--bar .wmc-cm-notice__inner { flex-direction: column; align-items: stretch; padding: 18px 20px; }
	.wmc-cm-notice__inner { padding: 18px 18px; }
	.wmc-cm-btn { flex: 1 1 100%; }
	.wmc-cm-modal { padding: 0; align-items: flex-end; }
	.wmc-cm-pref { max-height: 92vh; max-height: 92dvh; border-radius: var(--wmc-radius) var(--wmc-radius) 0 0; }
	.wmc-cm-cat__body { padding-left: 14px; }
	.wmc-cm-table, .wmc-cm-table thead, .wmc-cm-table tbody, .wmc-cm-table tr, .wmc-cm-table td { display: block; width: 100%; }
	.wmc-cm-table thead { display: none; }
	.wmc-cm-table tr { border: 1px solid var(--wmc-border); border-radius: 6px; margin-bottom: 8px; padding: 6px 0; }
	.wmc-cm-table td { border: 0; padding: 4px 10px; }
	.wmc-cm-table td::before { content: attr(data-label); display: block; font-weight: 600; font-size: 12px; opacity: .7; }
}
