/**
 * PK - Privacy & Cookie Consent Frontend CSS
 * Pure Vanilla CSS - Minimal, high-performance & responsive
 */

/* Banner Main Container - Container Query Context */
.pk-pcc-banner {
	container-type: inline-size;
	position: fixed;
	z-index: 999990;
	background-color: var(--pk-pcc-bg, #ffffff);
	color: var(--pk-pcc-text, #1e293b);
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.pk-pcc-banner *, .pk-pcc-modal *, .pk-pcc-badge * {
	box-sizing: border-box;
}

.pk-pcc-banner-container {
	max-width: var(--pk-pcc-max-width, 1200px);
	margin: 0 auto;
	padding: var(--pk-pcc-padding, 20px 24px);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pk-pcc-banner-title {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--pk-pcc-text, #1e293b);
}

.pk-pcc-banner-text p {
	margin: 0;
	font-size: 14px;
}

.pk-pcc-privacy-link {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
	margin-left: 6px;
}

/* Banner Layout Presets */
.pk-pcc-layout-bottom_bar {
	bottom: 0;
	left: 0;
	right: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.pk-pcc-layout-top_bar {
	top: 0;
	left: 0;
	right: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pk-pcc-layout-modal {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 32px);
	max-width: var(--pk-pcc-max-width, 580px);
	border-radius: var(--pk-pcc-radius, 12px);
}

.pk-pcc-layout-popup_left {
	bottom: 20px;
	left: 20px;
	width: calc(100% - 40px);
	max-width: var(--pk-pcc-max-width, 440px);
	border-radius: var(--pk-pcc-radius, 12px);
}

.pk-pcc-layout-popup_right {
	bottom: 20px;
	right: 20px;
	width: calc(100% - 40px);
	max-width: var(--pk-pcc-max-width, 440px);
	border-radius: var(--pk-pcc-radius, 12px);
}

/* Equal Weight Action Buttons */
.pk-pcc-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.pk-pcc-btn {
	flex: 1 1 120px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	text-align: center;
	transition: opacity 0.2s ease, transform 0.1s ease;
	line-height: 1.2;
}

.pk-pcc-btn:hover {
	opacity: 0.9;
}

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

.pk-pcc-btn-primary {
	background-color: var(--pk-pcc-btn-primary-bg, #0f172a);
	color: var(--pk-pcc-btn-primary-text, #ffffff);
}

.pk-pcc-btn-reject {
	background-color: var(--pk-pcc-btn-reject-bg, #e2e8f0);
	color: var(--pk-pcc-btn-reject-text, #475569);
}

.pk-pcc-btn-sec {
	background-color: var(--pk-pcc-btn-sec-bg, #f1f5f9);
	color: var(--pk-pcc-btn-sec-text, #334155);
}

/* Preferences Modal */
.pk-pcc-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.pk-pcc-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.pk-pcc-modal-dialog {
	position: relative;
	background-color: var(--pk-pcc-bg, #ffffff);
	color: var(--pk-pcc-text, #1e293b);
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	border-radius: 12px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 2;
}

.pk-pcc-modal-header {
	padding: 18px 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.pk-pcc-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.pk-pcc-modal-close-btn {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: inherit;
	line-height: 1;
}

.pk-pcc-modal-body {
	padding: 20px 24px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pk-pcc-modal-desc {
	margin: 0 0 8px 0;
	font-size: 13px;
	opacity: 0.85;
}

.pk-pcc-categories-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pk-pcc-category-item {
	padding: 14px;
	border-radius: 8px;
	background-color: rgba(0, 0, 0, 0.03);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.pk-pcc-cat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.pk-pcc-cat-name {
	font-weight: 600;
	font-size: 14px;
}

.pk-pcc-cat-desc {
	margin: 0;
	font-size: 12px;
	opacity: 0.8;
}

/* Pure CSS Toggle Switch */
.pk-pcc-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.pk-pcc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.pk-pcc-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #cbd5e1;
	transition: .2s;
	border-radius: 24px;
}

.pk-pcc-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .2s;
	border-radius: 50%;
}

.pk-pcc-switch input:checked + .pk-pcc-slider {
	background-color: #0284c7;
}

.pk-pcc-switch input:checked + .pk-pcc-slider:before {
	transform: translateX(20px);
}

.pk-pcc-switch input:disabled + .pk-pcc-slider {
	opacity: 0.6;
	cursor: not-allowed;
}

.pk-pcc-modal-footer {
	padding: 16px 24px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	display: flex;
	justify-content: flex-end;
}

/* Floating Revoke Badge Widget */
.pk-pcc-badge {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 999980;
	background-color: var(--pk-pcc-bg, #ffffff);
	color: var(--pk-pcc-text, #1e293b);
	border: 1px solid rgba(0, 0, 0, 0.12);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-radius: 30px;
	padding: 8px 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pk-pcc-badge:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Blocked Placeholder for Iframes */
.cookie-blocked-notice, .pk-pcc-blocked-notice {
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 8px;
	padding: 24px;
	text-align: center;
	color: #334155;
	margin: 15px 0;
	box-sizing: border-box;
}

.cookie-blocked-notice p, .pk-pcc-blocked-notice p {
	margin: 0 0 14px 0;
	font-size: 14px;
	line-height: 1.4;
}

.cookie-blocked-trigger, .pk-pcc-blocked-trigger {
	background-color: #0f172a;
	color: #ffffff;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.cookie-blocked-trigger:hover, .pk-pcc-blocked-trigger:hover {
	opacity: 0.9;
}

/* Cookie Table Shortcode Styling */
.pk-pcc-table-wrapper {
	overflow-x: auto;
	margin: 20px 0;
}

.pk-pcc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	text-align: left;
}

.pk-pcc-table th, .pk-pcc-table td {
	padding: 12px 14px;
	border-bottom: 1px solid #e2e8f0;
}

.pk-pcc-table th {
	background-color: #f8fafc;
	font-weight: 600;
	color: #1e293b;
}

.pk-pcc-col-name code {
	background: #f1f5f9;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 13px;
}

.pk-pcc-badge-cat {
	display: inline-block;
	background: #e0f2fe;
	color: #0369a1;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
}

/* Container Query Responsiveness based on Container Width (not Screen Viewport) */
@container (min-width: 640px) {
	.pk-pcc-banner-container {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.pk-pcc-banner-content {
		flex: 1 1 auto;
		padding-right: 16px;
	}

	.pk-pcc-banner-actions {
		flex: 0 0 auto;
	}
}
