/**
 * AI Studio Matrix Consent - Matrix Style CSS
 */

/* Banner - prawy dolny róg, kwadratowy */
.matrix-consent-banner {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 360px;
	max-width: calc(100vw - 40px);
	background: #0a0a0f;
	border: 2px solid #00ff88;
	box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
	z-index: 999999;
	padding: 20px;
	font-family: 'Orbitron', 'Share Tech Mono', monospace;
	color: #cbcbcb;
	animation: matrixGlow 2s ease-in-out infinite alternate;
	border-radius: 4px;
}

@keyframes matrixGlow {
	from {
		box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
	}
	to {
		box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
	}
}

.matrix-consent-content {
	margin: 0;
}

.matrix-consent-title {
	font-size: 16px;
	margin: 0 0 10px 0;
	color: #00ff88;
	text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
	font-weight: bold;
	letter-spacing: 0.5px;
}

.matrix-consent-text {
	font-size: 13px;
	line-height: 1.5;
	margin: 0 0 16px 0;
	color: #cbcbcb;
}

.matrix-consent-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.matrix-consent-btn {
	padding: 10px 16px;
	font-family: 'Orbitron', 'Share Tech Mono', monospace;
	font-size: 13px;
	font-weight: bold;
	border: 1px solid #00ff88;
	background: transparent;
	color: #00ff88;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
	width: 100%;
	text-align: center;
}

.matrix-consent-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: rgba(0, 255, 136, 0.1);
	transition: left 0.3s ease;
}

.matrix-consent-btn:hover::before {
	left: 0;
}

.matrix-consent-btn:hover {
	background: rgba(0, 255, 136, 0.1);
	box-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
	text-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
}

.matrix-consent-btn:active {
	transform: scale(0.98);
}

.matrix-consent-btn-accept {
	background: #00ff88;
	color: #0a0a0f;
	font-weight: bold;
}

.matrix-consent-btn-accept:hover {
	background: #00cc6a;
	box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
}

/* Modal */
.matrix-consent-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(10, 10, 15, 0.95);
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	backdrop-filter: blur(5px);
}

.matrix-consent-modal-content {
	background: #0a0a0f;
	border: 2px solid #00ff88;
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 30px;
	box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
	animation: modalGlow 2s ease-in-out infinite alternate;
	border-radius: 4px;
}

@keyframes modalGlow {
	from {
		box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
	}
	to {
		box-shadow: 0 0 60px rgba(0, 255, 136, 0.8);
	}
}

.matrix-consent-modal-title {
	font-size: clamp(20px, 2.5vw, 28px);
	margin: 0 0 24px 0;
	color: #00ff88;
	text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
	font-weight: bold;
	letter-spacing: 1px;
	text-align: center;
	border-bottom: 1px solid rgba(0, 255, 136, 0.3);
	padding-bottom: 12px;
}

.matrix-consent-categories {
	margin-bottom: 24px;
}

.matrix-consent-category {
	margin-bottom: 20px;
	padding: 16px;
	border: 1px solid rgba(0, 255, 136, 0.2);
	background: rgba(0, 255, 136, 0.05);
	transition: all 0.3s ease;
}

.matrix-consent-category:hover {
	border-color: rgba(0, 255, 136, 0.5);
	background: rgba(0, 255, 136, 0.1);
}

.matrix-consent-category-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.matrix-consent-category-label {
	font-size: clamp(14px, 1.5vw, 16px);
	color: #00ff88;
	font-weight: bold;
	flex: 1;
}

.matrix-consent-required {
	font-size: 12px;
	color: #cbcbcb;
	font-weight: normal;
	font-style: italic;
}

.matrix-consent-category-desc {
	font-size: clamp(12px, 1.3vw, 14px);
	color: #cbcbcb;
	margin: 0;
	line-height: 1.5;
}

/* Toggle Switch */
.matrix-consent-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 26px;
	flex-shrink: 0;
}

.matrix-consent-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.matrix-consent-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 255, 136, 0.2);
	border: 1px solid #00ff88;
	transition: 0.3s;
	border-radius: 26px;
}

.matrix-consent-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #0a0a0f;
	border: 1px solid #00ff88;
	transition: 0.3s;
	border-radius: 50%;
}

.matrix-consent-switch input:checked + .matrix-consent-slider {
	background-color: rgba(0, 255, 136, 0.3);
	box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.matrix-consent-switch input:checked + .matrix-consent-slider:before {
	transform: translateX(24px);
	background-color: #00ff88;
	box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.matrix-consent-switch input:disabled + .matrix-consent-slider {
	opacity: 0.5;
	cursor: not-allowed;
}

.matrix-consent-modal-buttons {
	display: flex;
	justify-content: center;
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid rgba(0, 255, 136, 0.3);
}

.matrix-consent-btn-save {
	min-width: 200px;
}

/* Scrollbar styling for modal */
.matrix-consent-modal-content::-webkit-scrollbar {
	width: 8px;
}

.matrix-consent-modal-content::-webkit-scrollbar-track {
	background: #0a0a0f;
	border-left: 1px solid rgba(0, 255, 136, 0.2);
}

.matrix-consent-modal-content::-webkit-scrollbar-thumb {
	background: rgba(0, 255, 136, 0.3);
	border: 1px solid #00ff88;
	border-radius: 4px;
}

.matrix-consent-modal-content::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 255, 136, 0.5);
}

/* Consent Icon - mały kwadracik po akceptacji */
.matrix-consent-icon {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 48px;
	height: 48px;
	background: #0a0a0f;
	border: 2px solid #00ff88;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 999998;
	color: #00ff88;
	box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
	transition: all 0.3s ease;
	animation: iconGlow 2s ease-in-out infinite alternate;
}

@keyframes iconGlow {
	from {
		box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
	}
	to {
		box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
	}
}

.matrix-consent-icon:hover {
	background: rgba(0, 255, 136, 0.1);
	box-shadow: 0 0 20px rgba(0, 255, 136, 0.7);
	transform: scale(1.05);
}

.matrix-consent-icon svg {
	width: 24px;
	height: 24px;
	stroke: #00ff88;
	fill: none;
}

.matrix-consent-icon:active {
	transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
	.matrix-consent-banner {
		bottom: 10px;
		right: 10px;
		width: calc(100vw - 20px);
		max-width: 360px;
		padding: 16px;
	}

	.matrix-consent-icon {
		bottom: 10px;
		right: 10px;
		width: 44px;
		height: 44px;
	}

	.matrix-consent-icon svg {
		width: 20px;
		height: 20px;
	}

	.matrix-consent-modal-content {
		padding: 20px;
	}

	.matrix-consent-buttons {
		flex-direction: column;
	}

	.matrix-consent-btn {
		width: 100%;
	}
}
