/**
 * Cookie Consent Plugin Styles
 * Matches the design exactly - 3 Column Layout
 */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Popup Container */
.cookie-consent-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: flex-end !important;
	justify-content: center;
	overflow: hidden; /* Remove scrollbar - content should fit within viewport */
	padding: 10px;
	padding-bottom: 40px; /* Add gap at the bottom */
	box-sizing: border-box;
	/* Prevent body scroll when popup is visible */
}

/* Overlay */
.cookie-consent-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

/* Main Container - 1520px width as per design */
.cookie-consent-container {
	/* position: relative; */
	position: fixed;
	width: 1520px;
	max-width: calc(100% - 40px);
	background: white;
	border: 10px solid #E9E9E9;
	border-radius: 0;
	box-sizing: border-box;
	margin: auto; /* Center the container */
	z-index: 1;
	overflow: hidden; /* Prevent content overflow and scrollbars */
	max-height: calc(100vh - 20px); /* Prevent exceeding viewport height */
	display: flex;
	flex-direction: column;
}

/* Content Wrapper - 2 Column Layout with Flexbox Row */
.cookie-consent-content {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	padding: 60px;
	box-sizing: border-box;
	width: 100%;
	gap: 60px; /* Gap between left and right columns */
	overflow: hidden; /* Remove all scrollbars */
}

/* Left Column - Text Content */
.cookie-consent-column-left {
	flex: 1;
	min-width: 0; /* Allow text to wrap */
	max-width: 55%; /* Slightly more space for text */
	width: 55%;
}

/* Right Column - Category Controls + Buttons */
.cookie-consent-column-right {
	flex: 1;
	min-width: 350px; /* Minimum width for controls - increased for better spacing */
	max-width: 45%; /* Slightly less but still balanced */
	width: 45%;
	display: flex;
	flex-direction: column;
	gap: 25px; /* Increased gap between categories and buttons */
}

/* Title - in Column 1 */
.cookie-consent-title {
	color: #333333;
	font-size: 22px;
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 26px 0; /* Gap between title and text */
	word-wrap: break-word;
	overflow-wrap: break-word;
	width: 402px;
	max-width: 100%; /* Responsive width */
}

/* Text Styling */
.cookie-consent-text {
	width: 100%;
}

.cookie-consent-text p {
	color: #666666;
	font-size: 14px;
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	line-height: 22px;
	margin: 0;
	word-wrap: break-word;
}

.cookie-consent-text p strong {
	font-weight: 700;
}

/* Privacy Policy Link */
.cookie-consent-privacy-link {
	color: #1279DA;
	font-size: 14px;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	text-decoration: underline;
	line-height: 22px;
	word-wrap: break-word;
}

.cookie-consent-privacy-link:hover {
	color: #0d5fa8;
	text-decoration: underline;
}

/* Category Controls */
.cookie-consent-categories {
	display: flex;
	flex-direction: row;
	gap: 18px;
	margin-bottom: 10px;
}

.cookie-consent-category-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 8px 0;
}

.cookie-consent-category-name {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #333333;
	user-select: none;
	flex: 1;
}

/* Toggle Switch Styles */
.cookie-consent-toggle-label {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 26px;
	flex-shrink: 0;
	cursor: pointer;
}

.cookie-consent-toggle {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
	pointer-events: none; /* Ensure checkbox doesn't interfere */
}

.cookie-consent-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: 0.3s;
	border-radius: 26px;
	display: block; /* Ensure it's visible */
}

.cookie-consent-toggle-slider:before {
	position: absolute;
	content: "";
	height: 20px;
	width: 20px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Toggle ON state */
.cookie-consent-toggle:checked + .cookie-consent-toggle-slider {
	background-color: #1279DA;
}

.cookie-consent-toggle:checked + .cookie-consent-toggle-slider:before {
	transform: translateX(24px);
}

/* Toggle disabled state (Necessary) */
.cookie-consent-toggle:disabled + .cookie-consent-toggle-slider {
	background-color: #1279DA;
	opacity: 0.7;
	cursor: not-allowed;
}

.cookie-consent-toggle:disabled + .cookie-consent-toggle-slider:before {
	cursor: not-allowed;
}

/* Hover effect for enabled toggles */
.cookie-consent-toggle:not(:disabled):hover + .cookie-consent-toggle-slider {
	box-shadow: 0 0 8px rgba(18, 121, 218, 0.4);
}

.cookie-consent-toggle:not(:disabled):checked:hover + .cookie-consent-toggle-slider {
	background-color: #0d5fa8;
}

/* Buttons Container - horizontal layout for 3 buttons */
.cookie-consent-buttons {
	display: flex;
	flex-direction: row;
	gap: 12px;
	width: 100%;
}

/* Buttons - Equal width to fit container */
.cookie-consent-btn {
	flex: 1 1 0; /* Equal width, can shrink/grow equally */
	min-width: 0; /* Allow buttons to shrink below content size */
	height: 58px;
	background: #004876;
	border: none;
	border-radius: 5px;
	color: white;
	font-size: 16px;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	box-sizing: border-box;
	padding: 0 15px; /* Reduced padding for better fit */
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	white-space: nowrap; /* Prevent text wrapping */
	overflow: hidden;
	text-overflow: ellipsis; /* Show ellipsis if text is too long */
}

/* Button variants */
.cookie-consent-btn.cookie-consent-save {
	background: #1279DA;
}

.cookie-consent-btn.cookie-consent-save:hover {
	background: #0d5fa8;
}

.cookie-consent-btn.cookie-consent-deny {
	background: #666666;
	display: none !important;
}

.cookie-consent-btn.cookie-consent-deny:hover {
	background: #555555;
}

.cookie-consent-btn.cookie-consent-accept {
	background: #004876;
}

.cookie-consent-btn.cookie-consent-accept:hover {
	background: #003355;
}

.cookie-consent-btn:hover {
	background: #003355;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.cookie-consent-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.cookie-consent-btn:focus {
	outline: 2px solid #004876;
	outline-offset: 2px;
}

/* Responsive Design - Large Desktops */
@media screen and (max-width: 1600px) {
	.cookie-consent-container {
		width: calc(100% - 40px);
		max-width: 1520px;
	}
	
	.cookie-consent-content {
		padding: 50px 40px;
		gap: 50px;
	}
}

/* Medium Desktops and Large Tablets */
@media screen and (max-width: 1400px) {
	.cookie-consent-content {
		padding: 50px 40px;
		gap: 40px;
	}
	
	.cookie-consent-column-left {
		max-width: 55%;
		width: 55%;
	}
	
	.cookie-consent-column-right {
		max-width: 45%;
		width: 45%;
		min-width: 320px;
	}
}

/* Tablets and Small Desktops */
@media screen and (max-width: 1200px) {
	.cookie-consent-container {
		max-width: calc(100% - 30px);
		margin: 15px;
	}
	
	.cookie-consent-content {
		flex-wrap: wrap;
		padding: 40px 30px;
		gap: 30px;
	}
	
	.cookie-consent-column-left,
	.cookie-consent-column-right {
		flex: 1 1 100%;
		max-width: 100%;
		min-width: 100%;
	}
}

/* Tablets Portrait */
@media screen and (max-width: 992px) {
	.cookie-consent-container {
		max-width: calc(100% - 20px);
		margin: 10px;
		border-width: 8px;
	}
	
	.cookie-consent-content {
		padding: 35px 25px;
		gap: 25px;
	}
}

/* Mobile Landscape and Small Tablets */
@media screen and (max-width: 768px) {
	.cookie-consent-popup {
		padding: 10px;
		padding-bottom: 30px;
		align-items: flex-end;
	}
	
	.cookie-consent-container {
		width: calc(100% - 20px);
		max-width: 100%;
		margin: 0 auto;
		border-width: 5px;
		max-height: calc(100vh - 20px);
	}
	
	.cookie-consent-content {
		flex-direction: column;
		padding: 30px 20px;
		gap: 25px;
		align-items: stretch;
		overflow: hidden;
	}
	
	.cookie-consent-column-left,
	.cookie-consent-column-right {
		width: 100%;
		max-width: 100%;
		flex: 1 1 100%;
	}
	
	.cookie-consent-title {
		width: 100%;
		max-width: 100%;
		font-size: 20px;
		margin-bottom: 20px;
	}
	
	.cookie-consent-buttons {
		flex-direction: row; /* Keep row layout on tablets */
		width: 100%;
		max-width: 100%;
		gap: 12px;
	}

	.cookie-consent-btn {
		flex: 1 1 0; /* Equal width buttons */
		min-width: 0;
		width: auto;
		padding: 0 15px;
		box-sizing: border-box;
		height: 50px; /* Consistent height */
	}
}

/* Mobile Portrait */
@media screen and (max-width: 576px) {
	.cookie-consent-popup {
		padding: 5px;
		padding-bottom: 30px;
		align-items: flex-end;
	}
	
	.cookie-consent-container {
		margin: 0 auto;
		border-width: 4px;
		max-width: calc(100% - 10px);
		max-height: calc(100vh - 10px);
	}
	
	.cookie-consent-content {
		padding: 25px 15px;
		gap: 20px;
		overflow: hidden;
	}
	
	.cookie-consent-title {
		font-size: 18px;
		margin-bottom: 15px;
		line-height: 1.3;
	}
	
	.cookie-consent-text p {
		font-size: 13px;
		line-height: 20px;
	}
	
	.cookie-consent-categories {
		gap: 15px;
	}
	
	.cookie-consent-category-item {
		padding: 6px 0;
	}
	
	.cookie-consent-buttons {
		flex-direction: column; /* Stack vertically on mobile */
		gap: 12px;
		width: 100%;
	}

	.cookie-consent-btn {
		width: 100%;
		flex: 0 0 auto; /* Don't shrink or grow, maintain size */
		min-width: 100%; /* Full width on mobile */
		height: 50px;
		font-size: 15px;
		padding: 0 15px;
		box-sizing: border-box;
	}
	
	.cookie-consent-toggle-label {
		width: 48px;
		height: 24px;
	}
	
	.cookie-consent-toggle-slider:before {
		height: 18px;
		width: 18px;
	}
	
	.cookie-consent-toggle:checked + .cookie-consent-toggle-slider:before {
		transform: translateX(22px);
	}
}

/* Very Small Mobile Devices */
@media screen and (max-width: 400px) {
	.cookie-consent-popup {
		padding: 5px;
		padding-bottom: 30px; /* Add gap at the bottom */
		align-items: flex-end; /* Align to bottom */
	}
	
	.cookie-consent-container {
		margin: 0 auto;
		border-width: 3px;
		max-width: calc(100% - 10px);
		border-radius: 0;
		max-height: calc(100vh - 10px);
	}
	
	.cookie-consent-content {
		padding: 20px 15px; /* Slightly more padding */
		gap: 18px;
		overflow: hidden;
	}
	
	.cookie-consent-title {
		font-size: 17px;
		margin-bottom: 12px;
	}
	
	.cookie-consent-text p {
		font-size: 12px;
		line-height: 18px;
	}
	
	.cookie-consent-buttons {
		flex-direction: column; /* Stack vertically on very small screens */
		width: 100%;
		gap: 12px;
	}

	.cookie-consent-btn {
		width: 100%;
		height: 50px; /* Consistent height */
		font-size: 14px;
		padding: 0 15px;
		min-width: 100%; /* Ensure full width */
		box-sizing: border-box;
		flex: 0 0 auto; /* Maintain size */
	}
}

/* Landscape Orientation for Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
	.cookie-consent-popup {
		align-items: flex-end; /* Align to bottom */
		padding: 5px;
		padding-bottom: 20px; /* Add gap at the bottom */
		overflow: hidden; /* No scrollbar */
	}
	
	.cookie-consent-container {
		max-height: calc(100vh - 10px);
		overflow: hidden; /* No scrollbar */
		margin: 0 auto;
	}
	
	.cookie-consent-content {
		padding: 20px;
		gap: 15px;
		flex-wrap: wrap;
	}
	
	.cookie-consent-column-1,
	.cookie-consent-column-2 {
		flex: 1 1 calc(50% - 7.5px);
		min-width: 250px;
	}
	
	.cookie-consent-column-3 {
		flex: 1 1 100%;
	}
	
	.cookie-consent-title {
		font-size: 18px;
		margin-bottom: 10px;
	}
	
	.cookie-consent-text p {
		font-size: 12px;
		line-height: 18px;
	}
	
	.cookie-consent-buttons {
		flex-direction: row;
	}
	
	.cookie-consent-btn {
		height: 45px;
		font-size: 14px;
		flex: 1 1 calc(50% - 7.5px);
	}
}

/* Extra Large Screens */
@media screen and (min-width: 1920px) {
	.cookie-consent-container {
		max-width: 1520px;
	}
}

/* Print Media - Hide popup when printing */
@media print {
	.cookie-consent-popup {
		display: none !important;
	}
}

@media screen and (max-width: 480px) {
	.cookie-consent-content {
		padding: 20px 15px;
	}
	
	.cookie-consent-title {
		font-size: 18px;
	}
	
	.cookie-consent-text p {
		font-size: 13px;
		line-height: 20px;
	}
	
	.cookie-consent-btn {
		height: 50px;
		font-size: 15px;
	}
}

/* Animation for popup appearance */
@keyframes cookieConsentFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.cookie-consent-popup {
	animation: cookieConsentFadeIn 0.3s ease-in;
	align-items: flex-end !important;
}

/* Ensure popup appears above everything */
.cookie-consent-popup {
	z-index: 999999;
}
