/* GDPR Manager — front-end styles.
 *
 * All colours and the corner radius are driven by CSS custom properties, set
 * from the plugin's brand settings (Settings → Branding) via an inline <style>.
 * You can also override any of these variables in your theme's stylesheet, e.g.
 *   :root { --gdpr-primary: #ff6600; --gdpr-banner-bg: #101820; }
 */
:root {
	--gdpr-primary: #2271b1;
	--gdpr-primary-hover: #135e96;
	--gdpr-primary-text: #ffffff;
	--gdpr-banner-bg: #1d2327;
	--gdpr-banner-text: #f0f0f1;
	--gdpr-link: #72aee6;
	--gdpr-radius: 4px;
	--gdpr-border: #8c8f94;
}

.gdpr-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99999;
	background: var(--gdpr-banner-bg);
	color: var(--gdpr-banner-text);
	box-shadow: 0 -2px 12px rgba( 0, 0, 0, 0.25 );
	font-size: 14px;
	line-height: 1.5;
}
.gdpr-pos-bottom { bottom: 0; }
.gdpr-pos-top { top: 0; box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.25 ); }

.gdpr-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 20px;
	display: flex;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
}
.gdpr-banner-text { flex: 1 1 340px; }
.gdpr-banner-text p { margin: 4px 0 0; }
.gdpr-banner-text a { color: var(--gdpr-link); }
.gdpr-banner-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.gdpr-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: var(--gdpr-radius);
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1;
}
.gdpr-btn-primary { background: var(--gdpr-primary); color: var(--gdpr-primary-text); }
.gdpr-btn-primary:hover { filter: brightness( 0.92 ); }
.gdpr-btn-secondary { background: transparent; color: inherit; border-color: var(--gdpr-border); }
.gdpr-btn-secondary:hover { background: rgba( 127, 127, 127, 0.12 ); }

/* Modal */
.gdpr-modal { position: fixed; inset: 0; z-index: 100000; }
.gdpr-modal-backdrop { position: absolute; inset: 0; background: rgba( 0, 0, 0, 0.5 ); }
.gdpr-modal-box {
	position: relative;
	max-width: 560px;
	margin: 6vh auto;
	max-height: 88vh;
	overflow-y: auto;
	background: #fff;
	color: #1d2327;
	border-radius: calc( var(--gdpr-radius) + 2px );
	padding: 24px 28px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.35 );
}
.gdpr-modal-box h2 { margin-top: 0; }
.gdpr-cat { border-top: 1px solid #e0e0e0; padding: 12px 0; }
.gdpr-cat:first-child { border-top: 0; }
.gdpr-cat-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.gdpr-cat-head em { color: #646970; font-weight: 400; font-size: 12px; margin-left: auto; }
.gdpr-cat-desc { margin: 6px 0 0 26px; color: #50575e; font-size: 13px; }
.gdpr-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 20px;
}

/* Request form */
.gdpr-request-form { max-width: 560px; }
.gdpr-request-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.gdpr-request-form input[type="email"],
.gdpr-request-form select,
.gdpr-request-form textarea { width: 100%; padding: 8px; }
.gdpr-form-consent label { font-weight: 400; }
.gdpr-form-note { font-size: 13px; color: #50575e; }
.gdpr-form-msg { padding: 10px 12px; border-radius: var(--gdpr-radius); margin-bottom: 12px; }
.gdpr-form-msg.is-success { background: #edfaef; border: 1px solid #68de7c; }
.gdpr-form-msg.is-error { background: #fcf0f1; border: 1px solid #f86368; }

/* Cookie declaration table */
.gdpr-cookie-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; }
.gdpr-cookie-table th,
.gdpr-cookie-table td { border: 1px solid #dcdcde; padding: 8px 10px; text-align: left; vertical-align: top; font-size: 14px; }
.gdpr-cookie-table th { background: #f6f7f7; }
.gdpr-cookie-policy .gdpr-cat-desc { color: #50575e; margin: 4px 0; }

/* Generated legal documents inherit your theme's typography by default. */
.gdpr-legal-document { max-width: 820px; }
.gdpr-legal-document h2 { margin-top: 0; }

@media ( max-width: 600px ) {
	.gdpr-banner-actions { width: 100%; }
	.gdpr-banner-actions .gdpr-btn { flex: 1; }
	.gdpr-cookie-table, .gdpr-cookie-table thead, .gdpr-cookie-table tbody,
	.gdpr-cookie-table th, .gdpr-cookie-table td, .gdpr-cookie-table tr { display: block; }
	.gdpr-cookie-table thead { display: none; }
	.gdpr-cookie-table td { border: 0; border-bottom: 1px solid #eee; }
}
