/* Cookie Consent Banner Styles */

/* Banner container - Fixed at bottom */
.chrc-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999999;
	padding: 24px;
	background-color: #ffffff;
	color: #000000;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	animation: chrc-slide-up 0.3s ease-out;
}

/* Hide banner when consent is given */
.chrc-banner.chrc-hidden {
	display: none;
}

/* Content layout */
.chrc-banner-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	gap: 20px;
	align-items: center;
	flex-wrap: wrap;
}

.chrc-banner-text {
	flex: 1;
	min-width: 300px;
}

.chrc-banner-title {
	display: none;
}

.chrc-banner-description {
	margin: 0;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	line-height: 1.2;
	color: #000000;
}

/* Cookie list table */
.chrc-cookie-list {
	display: inline;
	margin: 0 0 0 0.5em;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.chrc-cookie-list summary {
	display: inline;
	cursor: pointer;
	text-decoration: underline;
	color: #0073aa;
}

.chrc-cookie-list[open] {
	display: block;
	margin: 8px 0 0 0;
}

.chrc-cookies-table {
	width: 100%;
	margin-top: 8px;
	border-collapse: collapse;
}

.chrc-cookies-table th,
.chrc-cookies-table td {
	padding: 8px;
	text-align: left;
	border-bottom: 1px solid var(--wp--preset--color--accent-6, rgba(0, 0, 0, 0.1));
	line-height: 1.2;
	color: #000000;
}

.chrc-cookies-table th {
	font-weight: 600;
}

/* Buttons */
.chrc-banner-actions {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.chrc-button {
	padding: 16px 40px;
	border: none;
	border-radius: 4px;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s;
	white-space: nowrap;
	line-height: 1.2;
	color: #ffffff;
}

.chrc-button-accept {
	background-color: #0073aa;
}

.chrc-button-accept:hover {
	background-color: #005a87;
}

.chrc-button-decline {
	background-color: #d0d0d0;
	color: #000000;
}

.chrc-button-decline:hover {
	background-color: #b0b0b0;
}

.chrc-button:hover,
.chrc-button:focus {
	opacity: 0.8;
	outline: 2px solid var(--wp--preset--color--accent-1, #000);
	outline-offset: 2px;
}

/* Reopen link */
.chrc-reopen-link {
	cursor: pointer;
	text-decoration: underline;
}

/* Cookie list table in shortcode (for privacy policy page) */
.chrc-cookies-policy-table {
	width: 100%;
	margin: var(--wp--preset--spacing--40, 30px) 0;
	border-collapse: collapse;
}

.chrc-cookies-policy-table th,
.chrc-cookies-policy-table td {
	padding: var(--wp--preset--spacing--30, 20px);
	text-align: left;
	border: 1px solid var(--wp--preset--color--accent-6, rgba(0, 0, 0, 0.1));
}

.chrc-cookies-policy-table th {
	background-color: var(--wp--preset--color--accent-5, #f5f5f5);
	font-weight: 600;
}

.chrc-cookies-policy-table code {
	background-color: var(--wp--preset--color--accent-5, #f5f5f5);
	padding: 2px 6px;
	border-radius: 3px;
	font-family: monospace;
}

/* Animation */
@keyframes chrc-slide-up {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Responsive */
@media (max-width: 768px) {
	.chrc-banner-content {
		flex-direction: column;
		align-items: stretch;
	}

	.chrc-banner-actions {
		width: 100%;
	}

	.chrc-button {
		flex: 1;
	}

	.chrc-cookies-policy-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}
