/**
 * Gov BR Cookies Banner Styles
 *
 * @since 1.0.0
 */

#gov-br-cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: white;
	border-top: 4px solid #1351b4;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	z-index: 9999;
	max-height: 90vh;
	overflow-y: auto;
	display: none;
	animation: slideUp 0.3s ease-out;
}

#gov-br-cookie-banner.visible {
	display: block;
}

#gov-br-cookie-banner.hiding {
	animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes slideDown {
	from {
		transform: translateY(0);
		opacity: 1;
	}
	to {
		transform: translateY(100%);
		opacity: 0;
	}
}

.cookie-banner-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px;
}

.cookie-banner-header {
	margin-bottom: 20px;
}

.cookie-banner-title {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
}

.cookie-banner-description {
	color: #666;
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 20px 0;
}

.cookie-types {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin: 20px 0;
	padding: 20px 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
}

.cookie-type {
	padding: 15px;
	background: #f5f5f5;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.cookie-type:hover {
	background: #eeeeee;
}

.cookie-type-header {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
}

.cookie-type-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	margin: 0;
	flex: 1;
}

.cookie-type-label input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.cookie-name {
	font-weight: 600;
	color: #1a1a1a;
	font-size: 14px;
}

.cookie-required {
	display: inline-block;
	background: #dc3545;
	color: white;
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 3px;
	white-space: nowrap;
	flex-shrink: 0;
}

.cookie-description {
	font-size: 13px;
	color: #666;
	line-height: 1.5;
	margin: 0;
	padding-left: 26px;
}

.cookie-privacy-link {
	text-align: center;
	margin: 15px 0 0 0;
	padding: 0;
}

.cookie-privacy-link a {
	color: #1351b4;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
}

.cookie-privacy-link a:hover {
	text-decoration: underline;
}

.cookie-banner-footer {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 20px;
	flex-wrap: wrap;
}

.cookie-btn {
	padding: 10px 20px;
	border: 2px solid transparent;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
	text-decoration: none;
	display: inline-block;
	min-width: 120px;
	text-align: center;
	line-height: 1.4;
	outline: none;
}

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

.cookie-btn--primary {
	background: #1351b4;
	color: #fff;
	border-color: #1351b4;
}

.cookie-btn--primary:hover:not(:disabled) {
	background: #0d3d7d;
	border-color: #0d3d7d;
}

.cookie-btn--secondary {
	background: #e8e8e8;
	color: #333;
	border-color: #ccc;
}

.cookie-btn--secondary:hover:not(:disabled) {
	background: #d0d0d0;
}

/* Responsive */
@media (max-width: 768px) {
	#gov-br-cookie-banner {
		max-height: 100vh;
	}

	.cookie-banner-content {
		padding: 20px;
	}

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

	.cookie-banner-footer {
		flex-direction: column;
		justify-content: stretch;
	}

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

/* Accessibility */
#gov-br-cookie-banner:focus-within {
	outline: 2px solid #1351b4;
	outline-offset: -2px;
}

.cookie-type-label:focus {
	outline: 2px solid #1351b4;
	outline-offset: 2px;
	border-radius: 3px;
}

.cookie-type-label input[type="checkbox"]:focus {
	outline: 2px solid #1351b4;
	outline-offset: 2px;
	border-radius: 2px;
}

.cookie-btn:focus-visible {
	outline: 2px solid #1351b4;
	outline-offset: 2px;
}
