/* ==============================================
 * Cookie Consent Banner Styles
 * DSGVO/GDPR Compliant Cookie Consent System
 * ============================================== */

/* Banner Container */
.sf-cookie-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #ffffff;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	z-index: 9999;
	padding: 20px;
	animation: slideUp 0.3s ease-in-out;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: #333333;
}

/* Slide up animation */
@keyframes slideUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Content wrapper */
.sf-cookie-content {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 20px;
	align-items: start;
}

/* Text section */
.sf-cookie-text {
	flex: 1;
}

.sf-cookie-title {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

.sf-cookie-description {
	margin: 0 0 12px 0;
	font-size: 13px;
	color: #555555;
}

.sf-cookie-description a {
	color: #0073aa;
	text-decoration: none;
	border-bottom: 1px solid #0073aa;
}

.sf-cookie-description a:hover {
	color: #005a87;
}

/* Categories section */
.sf-cookie-categories {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-bottom: 15px;
}

.sf-cookie-category {
	display: flex;
	align-items: flex-start;
}

.sf-cookie-label {
	display: flex;
	align-items: flex-start;
	cursor: pointer;
	user-select: none;
	gap: 10px;
	flex: 1;
}

.sf-cookie-checkbox {
	margin-top: 2px;
	cursor: pointer;
	accent-color: #0073aa;
	width: 18px;
	height: 18px;
	min-width: 18px;
	flex-shrink: 0;
}

.sf-cookie-checkbox:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.sf-cookie-label-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sf-cookie-label-text strong {
	font-weight: 600;
	color: #1a1a1a;
	font-size: 13px;
}

.sf-cookie-description-short {
	display: block;
	font-size: 12px;
	color: #777777;
	line-height: 1.4;
}

/* Actions section */
.sf-cookie-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

/* Button styles */
.sf-btn {
	padding: 8px 16px;
	border: none;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.sf-btn:hover,
.sf-btn:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
}

.sf-btn:focus {
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.25);
}

/* Primary button */
.sf-btn-primary {
	background-color: #0073aa;
	color: #ffffff;
}

.sf-btn-primary:hover {
	background-color: #005a87;
}

.sf-btn-primary:active {
	transform: scale(0.98);
}

/* Secondary button */
.sf-btn-secondary {
	background-color: #f0f0f0;
	color: #333333;
	border: 1px solid #dddddd;
}

.sf-btn-secondary:hover {
	background-color: #e8e8e8;
}

/* Link button */
.sf-btn-link {
	background-color: transparent;
	color: #0073aa;
	text-decoration: underline;
	padding: 8px 0;
}

.sf-btn-link:hover {
	color: #005a87;
}

/* Modal Styles */
.sf-cookie-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: fadeIn 0.2s ease-in-out;
}

.sf-cookie-modal[aria-hidden="false"] {
	display: flex;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.sf-cookie-modal-content {
	background-color: #ffffff;
	border-radius: 8px;
	max-width: 600px;
	width: 100%;
	padding: 30px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
	from {
		transform: translateY(-20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.sf-cookie-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 32px;
	cursor: pointer;
	color: #999999;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: color 0.2s ease;
}

.sf-cookie-modal-close:hover {
	color: #333333;
}

.sf-cookie-modal h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 20px;
	font-weight: 600;
	color: #1a1a1a;
}

/* Modal Categories */
.sf-cookie-modal-categories {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 25px;
}

.sf-cookie-modal-category {
	padding: 15px;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.sf-cookie-modal-category:hover {
	border-color: #d0d0d0;
	background-color: #f9f9f9;
}

.sf-cookie-modal-category h4 {
	margin: 0 0 8px 0;
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
}

.sf-cookie-modal-category p {
	margin: 0 0 12px 0;
	font-size: 13px;
	color: #666666;
	line-height: 1.5;
}

.sf-cookie-modal-category label {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Toggle switch */
.sf-cookie-toggle {
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
	gap: 10px;
}

.sf-cookie-modal-checkbox {
	width: 18px;
	height: 18px;
	min-width: 18px;
	cursor: pointer;
	accent-color: #0073aa;
}

.sf-cookie-modal-checkbox:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.sf-toggle-slider {
	display: inline-block;
	width: 44px;
	height: 24px;
	background-color: #ccc;
	border-radius: 12px;
	position: relative;
	margin: 0;
	transition: background-color 0.3s ease;
}

.sf-cookie-modal-checkbox:checked ~ .sf-toggle-slider {
	background-color: #0073aa;
}

.sf-toggle-slider::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: white;
	top: 2px;
	left: 2px;
	transition: left 0.3s ease;
}

.sf-cookie-modal-checkbox:checked ~ .sf-toggle-slider::after {
	left: 22px;
}

.sf-cookie-required {
	display: inline-block;
	background-color: #f0f0f0;
	color: #999999;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 3px;
	margin-left: 10px;
	font-weight: 600;
}

/* Modal Actions */
.sf-cookie-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	border-top: 1px solid #e8e8e8;
	padding-top: 20px;
}

.sf-cookie-modal-actions .sf-btn {
	min-width: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.sf-cookie-consent {
		padding: 15px;
	}

	.sf-cookie-content {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.sf-cookie-categories {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.sf-cookie-actions {
		flex-direction: column;
		width: 100%;
	}

	.sf-cookie-actions .sf-btn {
		width: 100%;
	}

	.sf-cookie-modal-content {
		padding: 20px;
		max-height: 85vh;
	}

	.sf-cookie-modal-actions {
		flex-direction: column;
	}

	.sf-cookie-modal-actions .sf-btn {
		width: 100%;
	}
}

/* Accessibility */
.sf-cookie-consent:focus-within {
	box-shadow: 0 -4px 15px rgba(0, 115, 170, 0.15);
}

.sf-btn:focus-visible {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
	.sf-cookie-consent {
		border-top: 3px solid #000;
	}

	.sf-btn-primary {
		border: 2px solid #0073aa;
	}

	.sf-btn-secondary {
		border: 2px solid #333333;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.sf-cookie-consent,
	.sf-cookie-modal,
	.sf-cookie-modal-content {
		animation: none;
	}

	.sf-btn,
	.sf-toggle-slider,
	.sf-toggle-slider::after {
		transition: none;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.sf-cookie-consent {
		background-color: #1a1a1a;
		color: #e8e8e8;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
	}

	.sf-cookie-title {
		color: #ffffff;
	}

	.sf-cookie-description {
		color: #b8b8b8;
	}

	.sf-cookie-description a {
		color: #64b5f6;
	}

	.sf-cookie-description a:hover {
		color: #90caf9;
	}

	.sf-cookie-label-text strong {
		color: #ffffff;
	}

	.sf-cookie-description-short {
		color: #999999;
	}

	.sf-btn-secondary {
		background-color: #2a2a2a;
		color: #e8e8e8;
		border-color: #404040;
	}

	.sf-btn-secondary:hover {
		background-color: #333333;
	}

	.sf-btn-link {
		color: #64b5f6;
	}

	.sf-btn-link:hover {
		color: #90caf9;
	}

	.sf-cookie-modal-content {
		background-color: #2a2a2a;
		color: #e8e8e8;
	}

	.sf-cookie-modal-category {
		border-color: #404040;
		color: #e8e8e8;
	}

	.sf-cookie-modal-category:hover {
		background-color: #323232;
		border-color: #505050;
	}

	.sf-cookie-modal-category h4 {
		color: #ffffff;
	}

	.sf-cookie-modal-category p {
		color: #b8b8b8;
	}

	.sf-cookie-modal-close {
		color: #999999;
	}

	.sf-cookie-modal-close:hover {
		color: #ffffff;
	}

	.sf-cookie-modal-categories {
		border-color: #404040;
	}

	.sf-cookie-required {
		background-color: #404040;
		color: #999999;
	}

	.sf-cookie-modal-actions {
		border-color: #404040;
	}
}

/* Print styles */
@media print {
	.sf-cookie-consent,
	.sf-cookie-modal {
		display: none !important;
	}
}
