/* ==========================================================================
   GDPR Preferences Modal
   ========================================================================== */

/* Prevent body scroll when modal is open */
body.gdpr-modal-open {
	overflow: hidden;
}

/* Overlay backdrop */
#gdpr-preferences-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.6);
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

/* Modal box */
.gdpr-modal-box {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	font-family: inherit;
}

/* Header */
.gdpr-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #e5e5e5;
	flex-shrink: 0;
}

.gdpr-modal-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.3;
}

.gdpr-modal-close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	color: #666;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
	flex-shrink: 0;
}

.gdpr-modal-close:hover {
	color: #111;
	background: #f0f0f0;
}

/* Body */
.gdpr-modal-body {
	padding: 20px 24px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.gdpr-modal-intro {
	margin: 0 0 20px;
	font-size: 14px;
	color: #555;
	line-height: 1.6;
}

/* Category list */
.gdpr-category-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gdpr-category-item {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 14px 16px;
	margin-bottom: 12px;
}

.gdpr-category-item:last-child {
	margin-bottom: 0;
}

.gdpr-category-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.gdpr-category-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	flex: 1;
}

.gdpr-category-checkbox {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #2271b1;
	flex-shrink: 0;
}

.gdpr-category-checkbox:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.gdpr-category-name {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
}

.gdpr-category-desc {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.5;
}

/* Status badges */
.gdpr-status-badge {
	font-size: 12px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 20px;
	white-space: nowrap;
	flex-shrink: 0;
}

.gdpr-always-active {
	background: #d4edda;
	color: #155724;
}

.gdpr-status-toggle {
	background: #f0f0f0;
	color: #666;
	transition: background 0.15s, color 0.15s;
}

.gdpr-status-toggle.gdpr-is-active {
	background: #d4edda;
	color: #155724;
}

/* Footer */
.gdpr-modal-footer {
	display: flex;
	gap: 12px;
	padding: 16px 24px 20px;
	border-top: 1px solid #e5e5e5;
	flex-shrink: 0;
	flex-wrap: wrap;
}

.gdpr-btn {
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 5px;
	border: none;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
	line-height: 1.4;
}

.gdpr-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.gdpr-btn-primary {
	background: #2271b1;
	color: #fff;
}

.gdpr-btn-primary:hover:not(:disabled) {
	background: #135e96;
}

.gdpr-btn-secondary {
	background: #f0f0f0;
	color: #1a1a1a;
}

.gdpr-btn-secondary:hover:not(:disabled) {
	background: #ddd;
}

/* "Manage Preferences" trigger link in the banner */
.cn-manage-preferences {
	display: inline-block;
	margin-left: 8px;
	font-size: 13px;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.85;
}

.cn-manage-preferences:hover {
	opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
	.gdpr-modal-box {
		max-height: 95vh;
	}

	.gdpr-modal-footer {
		flex-direction: column;
	}

	.gdpr-btn {
		width: 100%;
		text-align: center;
	}
}

/* ==========================================================================
   Persistent Floating "Cookie Settings" Button
   ========================================================================== */

#gdpr-floating-btn {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 6px;
}

#gdpr-floating-btn .gdpr-floating-hide {
	width: 24px;
	height: 24px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

#gdpr-floating-btn .gdpr-floating-hide:hover {
	background: rgba(0, 0, 0, 0.75);
}

#gdpr-floating-btn a.cn-manage-preferences {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #2271b1;
	color: #fff;
	text-decoration: none;
	padding: 9px 14px;
	border-radius: 24px;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
	opacity: 1;
	margin-left: 0;
}

#gdpr-floating-btn a.cn-manage-preferences:hover {
	background: #135e96;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	transform: translateY(-1px);
}

.gdpr-floating-icon {
	font-size: 15px;
	line-height: 1;
}

.gdpr-floating-label {
	line-height: 1;
}

/* Responsive — icon only on very small screens */
@media (max-width: 360px) {
	.gdpr-floating-label {
		display: none;
	}

	#gdpr-floating-btn a.cn-manage-preferences {
		padding: 10px;
		border-radius: 50%;
	}
}
