/* MyConsent banner + modal. Scoped under #myconsent-root. */

#myconsent-root {
	--myconsent-accent: #2563eb;
	--myconsent-bg: #ffffff;
	--myconsent-text: #1f2937;
	--myconsent-btn-text: #ffffff;
	--myconsent-max-width: 1100px;
	--myconsent-radius: 12px;
	position: fixed;
	z-index: 999999;
	left: 0;
	right: 0;
	box-sizing: border-box;
}

#myconsent-root[hidden] {
	display: none;
}

#myconsent-root * {
	box-sizing: border-box;
}

/* Position variants */
#myconsent-root.myconsent-position-bottom { bottom: 0; }
#myconsent-root.myconsent-position-top { top: 0; }
#myconsent-root.myconsent-position-center {
	top: 0; bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.45 );
}

/* Floating bars pinned to the bottom-left or bottom-right corner. The root
   hugs its side (overriding the full-width default) so the rest of the page
   stays clickable; the bar is only as tall as its content. */
#myconsent-root.myconsent-position-left { right: auto; bottom: 0; }
#myconsent-root.myconsent-position-right { left: auto; bottom: 0; }
#myconsent-root.myconsent-position-left .myconsent-banner,
#myconsent-root.myconsent-position-right .myconsent-banner {
	margin: 16px;
	width: var( --myconsent-max-width );
	max-width: calc( 100vw - 32px );
}

/* Banner */
.myconsent-banner {
	background: var( --myconsent-bg );
	color: var( --myconsent-text );
	margin: 16px auto;
	max-width: var( --myconsent-max-width );
	padding: 20px 24px;
	border-radius: var( --myconsent-radius );
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.18 );
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.myconsent-position-center .myconsent-banner { margin: 0; }

.myconsent-banner__text { flex: 1 1 360px; }
.myconsent-banner__title { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.myconsent-banner__message { margin: 0; color: var( --myconsent-text ); opacity: 0.85; }
.myconsent-banner__message a { color: var( --myconsent-accent ); }

.myconsent-banner__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* Buttons */
.myconsent-btn {
	cursor: pointer;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid transparent;
	line-height: 1;
}
.myconsent-btn--primary {
	background: var( --myconsent-accent );
	color: var( --myconsent-btn-text );
}
.myconsent-btn--primary:hover { filter: brightness( 0.94 ); }
.myconsent-btn--ghost {
	background: transparent;
	color: var( --myconsent-text );
	border-color: currentColor;
	opacity: 0.75;
}
.myconsent-btn--ghost:hover { opacity: 1; }

/* Modal */
.myconsent-modal {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.5 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.myconsent-modal[hidden] { display: none; }

.myconsent-modal__panel {
	background: var( --myconsent-bg );
	color: var( --myconsent-text );
	width: 100%;
	max-width: 520px;
	max-height: 85vh;
	overflow: auto;
	border-radius: var( --myconsent-radius );
	padding: 28px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.myconsent-modal__title { margin: 0 0 16px; font-size: 18px; }

.myconsent-cat {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 4px 12px;
	padding: 14px 0;
	border-top: 1px solid #e5e7eb;
}
.myconsent-cat input { grid-row: span 2; margin-top: 3px; }
.myconsent-cat__label { font-weight: 600; }
.myconsent-cat__desc { color: #6b7280; font-size: 13px; }

.myconsent-modal__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}

@media ( max-width: 600px ) {
	.myconsent-banner { flex-direction: column; align-items: stretch; }
	.myconsent-banner__actions .myconsent-btn { flex: 1; }
}

/* Cookie-policy shortcode disclosure */
.myconsent-cookie-policy { font-size: 15px; line-height: 1.6; }
.myconsent-cp-heading { margin: 1.5em 0 0.25em; font-size: 1.25em; }
.myconsent-cp-desc { margin: 0 0 1em; color: #4b5563; }
.myconsent-cp-service { margin: 1em 0 0.5em; font-size: 1.05em; }
.myconsent-cp-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1em;
	font-size: 0.95em;
}
.myconsent-cp-table th,
.myconsent-cp-table td {
	border: 1px solid #e5e7eb;
	padding: 8px 12px;
	text-align: left;
	vertical-align: top;
}
.myconsent-cp-table th { background: #f9fafb; font-weight: 600; }
.myconsent-cp-table code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; }
