/**
 * Cookie Consent Frontend Styles
 *
 * @package cookies-consent
 */

/* ==========================================================================
   Screen Reader Only Class - CRITICAL for Accessibility
   ========================================================================== */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* ==========================================================================
   Banner Base Styles
   ========================================================================== */
.cc-banner {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	background-color: #000000;
	color: #FFFFFF;
	z-index: 99999;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	padding: 20px;
	box-sizing: border-box;
}

.cc-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.cc-content {
	flex: 1;
	min-width: 300px;
}

.cc-heading {
	margin: 0 0 10px 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.4;
}

.cc-message {
	margin: 0 0 10px 0;
	font-size: 0.9rem;
	line-height: 1.6;
}

.cc-links {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.cc-links a {
	text-decoration: underline;
	font-size: 0.875rem;
	transition: opacity 0.2s;
}

.cc-links a:hover,
.cc-links a:focus {
	opacity: 0.8;
}

/* ==========================================================================
   Layout Variants
   ========================================================================== */
.cc-layout-bar_top {
	top: 0;
	bottom: auto;
}

.cc-layout-bar_bottom {
	top: auto;
	bottom: 0;
}

.cc-layout-modal_center {
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	transform: translate(-50%, -50%);
	width: auto;
	max-width: 600px;
	border-radius: 8px;
}

/* ==========================================================================
   Alignment Variants (for bar layouts only)
   ========================================================================== */
.cc-align-left .cc-container {
	margin-left: 0;
	margin-right: auto;
}

.cc-align-center .cc-container {
	margin-left: auto;
	margin-right: auto;
}

.cc-align-right .cc-container {
	margin-left: auto;
	margin-right: 0;
}

/* Modal center ignores alignment - always centered */
.cc-layout-modal_center .cc-container {
	margin-left: auto;
	margin-right: auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.cc-buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.cc-btn {
	display: inline-block;
	padding: 12px 24px;
	min-width: 44px;
	min-height: 44px;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
	white-space: nowrap;
	line-height: 1.2;
}

.cc-btn:hover {
	opacity: 0.9;
}

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

.cc-btn-primary {
	background-color: #4CAF50;
	color: #FFFFFF;
}

.cc-btn-secondary {
	background-color: #666666;
	color: #FFFFFF;
}

/* ==========================================================================
   Focus Indicators - CRITICAL for Keyboard Navigation
   ========================================================================== */
.cc-btn:focus,
.cc-modal-close:focus,
#cookies-consent-floating-btn:focus,
.cc-category input:focus,
.cc-links a:focus {
	outline: 3px solid #4A90E2;
	outline-offset: 2px;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */
.cc-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: none;
}

.cc-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(2px);
}

.cc-modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: #FFFFFF;
	color: #333333;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	z-index: 100000;
}

.cc-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	color: #333333;
	padding: 5px 10px;
	min-width: 44px;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cc-modal-close:hover {
	color: #000000;
}

.cc-modal h2 {
	margin: 0 0 15px 0;
	font-size: 1.5rem;
	color: #333333;
}

.cc-modal-description {
	margin: 0 0 20px 0;
	color: #666666;
	line-height: 1.6;
}

/* ==========================================================================
   Cookie Categories
   ========================================================================== */
.cc-category {
	margin-bottom: 20px;
	padding: 15px;
	background-color: #F9F9F9;
	border-radius: 6px;
}

.cc-category label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 1rem;
}

.cc-category input[type="checkbox"] {
	margin-top: 4px;
	min-width: 18px;
	min-height: 18px;
	cursor: pointer;
}

.cc-category input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.cc-category strong {
	display: block;
	margin-bottom: 5px;
	color: #333333;
}

.cc-category-desc {
	margin: 8px 0 0 28px;
	font-size: 0.875rem;
	color: #666666;
	line-height: 1.6;
}

.cc-modal-buttons {
	display: flex;
	gap: 10px;
	margin-top: 25px;
	flex-wrap: wrap;
}

/* ==========================================================================
   Floating Button
   ========================================================================== */
#cookies-consent-floating-btn {
	position: fixed;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: #4CAF50;
	color: #FFFFFF;
	border: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s;
	z-index: 99998;
}

#cookies-consent-floating-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#cookies-consent-floating-btn:active {
	transform: scale(1.05);
}

.cc-floating-bottom-right {
	bottom: 20px;
	right: 20px;
}

.cc-floating-bottom-left {
	bottom: 20px;
	left: 20px;
}

.cc-floating-top-right {
	top: 20px;
	right: 20px;
}

.cc-floating-top-left {
	top: 20px;
	left: 20px;
}

/* ==========================================================================
   Shortcode Styles - Cookie Settings Trigger
   ========================================================================== */

/* Link style trigger */
.cc-settings-link {
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	transition: opacity 0.2s ease;
}

.cc-settings-link:hover,
.cc-settings-link:focus {
	opacity: 0.7;
	text-decoration: underline;
}

/* Button style trigger */
.cc-settings-button {
	display: inline-block;
	padding: 10px 20px;
	background-color: #4CAF50;
	color: #FFFFFF;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.1s ease;
	line-height: 1.5;
}

.cc-settings-button:hover {
	background-color: #45a049;
	transform: translateY(-1px);
}

.cc-settings-button:focus {
	outline: 3px solid #4A90E2;
	outline-offset: 2px;
}

.cc-settings-button:active {
	transform: translateY(0);
}

/* Ensure minimum touch target size for accessibility */
.cc-settings-trigger {
	min-height: 44px;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ==========================================================================
   Responsive Design - Mobile < 768px
   ========================================================================== */
@media (max-width: 767px) {
	.cc-container {
		flex-direction: column;
		align-items: stretch;
	}

	.cc-content {
		min-width: 0;
	}

	.cc-buttons {
		flex-direction: column;
		width: 100%;
	}

	.cc-btn {
		width: 100%;
		text-align: center;
	}

	.cc-modal-content {
		width: 95%;
		padding: 20px;
		max-height: 85vh;
	}

	.cc-category-desc {
		margin-left: 0;
	}

	.cc-modal-buttons {
		flex-direction: column;
	}

	.cc-modal-buttons .cc-btn {
		width: 100%;
	}

	#cookies-consent-floating-btn {
		width: 50px;
		height: 50px;
	}

	.cc-floating-bottom-right,
	.cc-floating-bottom-left {
		bottom: 15px;
	}

	.cc-floating-bottom-right {
		right: 15px;
	}

	.cc-floating-bottom-left {
		left: 15px;
	}
}

/* ==========================================================================
   Accessibility Features
   ========================================================================== */

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.cc-banner,
	.cc-modal-content {
		border: 2px solid currentColor;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.cc-banner,
	.cc-modal,
	.cc-floating-btn,
	.cc-btn,
	.cc-links a,
	#cookies-consent-floating-btn {
		animation: none !important;
		transition: none !important;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
	.cc-banner,
	.cc-modal,
	#cookies-consent-floating-btn {
		display: none !important;
	}
}
