/**
 * Totaliweb Compliance — consent banner + modal styles.
 * Brand: primary #9D4EDD, secondary #FF1053, accent #00F0FF, dark #090514, card #120B24.
 * Pairs with the theme's glass-panel / btn-gradient classes (falls back gracefully).
 */

.tw-consent,
.tw-consent-modal,
.tw-consent-reopen {
	font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
	box-sizing: border-box;
}

.tw-consent *,
.tw-consent-modal * {
	box-sizing: border-box;
}

/* -------------------------------------------------- Banner */
.tw-consent {
	position: fixed;
	z-index: 99990;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	width: min(960px, calc(100% - 32px));
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-radius: 18px;
	color: #f4f0ff;
	background: rgba(18, 11, 36, 0.92);
	border: 1px solid rgba(157, 78, 221, 0.4);
	box-shadow: 0 20px 60px rgba(5, 2, 10, 0.6);
	backdrop-filter: blur(14px);
}

.tw-consent__body {
	flex: 1 1 380px;
	min-width: 260px;
}

.tw-consent__title {
	margin: 0 0 6px;
	font-size: 1.15rem;
	font-weight: 700;
}

.tw-consent__text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #cfc6e6;
}

.tw-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

/* -------------------------------------------------- Buttons */
.tw-consent__btn {
	cursor: pointer;
	border: 0;
	border-radius: 999px;
	padding: 11px 20px;
	font-size: 0.88rem;
	font-weight: 600;
	font-family: inherit;
	line-height: 1;
	color: #fff;
	background: linear-gradient(135deg, #9D4EDD 0%, #FF1053 100%);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.tw-consent__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(157, 78, 221, 0.45);
}

.tw-consent__btn:focus-visible {
	outline: 3px solid #00F0FF;
	outline-offset: 2px;
}

.tw-consent__btn--ghost {
	background: transparent;
	border: 1px solid rgba(157, 78, 221, 0.55);
	color: #e7defc;
}

.tw-consent__btn--ghost:hover {
	background: rgba(157, 78, 221, 0.18);
	box-shadow: none;
}

/* -------------------------------------------------- Modal */
.tw-consent-modal {
	position: fixed;
	inset: 0;
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tw-consent-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 2, 10, 0.7);
	backdrop-filter: blur(4px);
}

.tw-consent-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(720px, 100%);
	max-height: 86vh;
	overflow-y: auto;
	padding: 24px 28px;
	border-radius: 20px;
	color: #f4f0ff;
	background: rgba(18, 11, 36, 0.97);
	border: 1px solid rgba(157, 78, 221, 0.4);
	box-shadow: 0 30px 80px rgba(5, 2, 10, 0.7);
}

.tw-consent-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.tw-consent-modal__head h2 {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 700;
}

.tw-consent-modal__close {
	cursor: pointer;
	border: 0;
	background: transparent;
	color: #cfc6e6;
	font-size: 1.8rem;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 8px;
}

.tw-consent-modal__close:hover {
	color: #fff;
	background: rgba(157, 78, 221, 0.2);
}

.tw-consent-modal__close:focus-visible {
	outline: 3px solid #00F0FF;
	outline-offset: 2px;
}

.tw-consent-modal__categories {
	margin: 16px 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tw-consent-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 8px;
}

/* -------------------------------------------------- Category card */
.tw-consent-cat {
	border: 1px solid rgba(157, 78, 221, 0.28);
	border-radius: 14px;
	padding: 14px 16px;
	background: rgba(9, 5, 20, 0.45);
}

.tw-consent-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tw-consent-cat__label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	cursor: pointer;
}

.tw-consent-cat__name {
	font-size: 1rem;
}

.tw-consent-cat__always {
	font-size: 0.72rem;
	font-weight: 600;
	color: #00FFA3;
	border: 1px solid rgba(0, 255, 163, 0.4);
	border-radius: 999px;
	padding: 2px 8px;
}

.tw-consent-cat__toggle {
	width: 20px;
	height: 20px;
	accent-color: #9D4EDD;
	cursor: pointer;
}

.tw-consent-cat__toggle:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.tw-consent-cat__desc {
	margin: 8px 0 0;
	font-size: 0.85rem;
	line-height: 1.5;
	color: #c3b9dc;
}

.tw-consent-cat__table {
	width: 100%;
	margin-top: 10px;
	border-collapse: collapse;
	font-size: 0.8rem;
}

.tw-consent-cat__table th,
.tw-consent-cat__table td {
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid rgba(157, 78, 221, 0.18);
	color: #d8d0ec;
}

.tw-consent-cat__table th {
	color: #00F0FF;
	font-weight: 600;
}

.tw-consent-cat__table code {
	color: #fff;
	background: rgba(157, 78, 221, 0.22);
	padding: 1px 6px;
	border-radius: 6px;
	font-size: 0.78rem;
}

/* -------------------------------------------------- Re-open trigger */
.tw-consent-reopen {
	position: fixed;
	z-index: 99980;
	left: 18px;
	bottom: 84px;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	font-size: 1.1rem;
	background: linear-gradient(135deg, #9D4EDD 0%, #FF1053 100%);
	box-shadow: 0 10px 30px rgba(157, 78, 221, 0.45);
	transition: transform 0.15s ease;
}

.tw-consent-reopen:hover {
	transform: scale(1.08);
}

.tw-consent-reopen:focus-visible {
	outline: 3px solid #00F0FF;
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------- Responsive */
@media (max-width: 600px) {
	.tw-consent {
		flex-direction: column;
		align-items: stretch;
		bottom: 12px;
	}

	.tw-consent__actions {
		justify-content: stretch;
	}

	.tw-consent__btn {
		flex: 1 1 auto;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tw-consent__btn,
	.tw-consent-reopen {
		transition: none;
	}
}
