/* ═══════════════════════════════════════════════════════
   TuTTiReal Cookie Consent  —  v1.0.0
   ═══════════════════════════════════════════════════════ */

/* ── Backdrop ──────────────────────────────────────────── */
#tr-cc-wrap {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	padding: 16px;
	box-sizing: border-box;
	animation: tr-cc-fade-in 0.25s ease;
}

#tr-cc-wrap[hidden] {
	display: none !important;
}

@keyframes tr-cc-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ── Banner card ───────────────────────────────────────── */
#tr-cc-banner {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
	width: 100%;
	max-width: 680px;
	padding: 28px 32px;
	box-sizing: border-box;
	animation: tr-cc-slide-up 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	color: #1a1a2e;
}

@keyframes tr-cc-slide-up {
	from { transform: translateY(24px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

/* ── Simple view ───────────────────────────────────────── */
#tr-cc-simple {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

#tr-cc-intro {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

#tr-cc-icon {
	font-size: 28px;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 2px;
}

#tr-cc-title {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: #111111;
	margin-bottom: 4px;
}

#tr-cc-desc {
	margin: 0;
	color: #555;
	font-size: 13.5px;
}

#tr-cc-desc a {
	color: #cc2222;
	text-decoration: none;
}

#tr-cc-desc a:hover {
	text-decoration: underline;
}

/* ── Buttons ───────────────────────────────────────────── */
#tr-cc-btns,
#tr-cc-prefs-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.tr-cc-btn {
	border: none;
	border-radius: 10px;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 600;
	padding: 10px 20px;
	transition: all 0.18s ease;
	font-family: inherit;
	white-space: nowrap;
}

.tr-cc-btn--primary {
	background: #cc2222;
	color: #fff;
}

.tr-cc-btn--primary:hover {
	background: #a81c1c;
}

.tr-cc-btn--outline {
	background: transparent;
	color: #333;
	border: 1.5px solid #d0d0d0;
}

.tr-cc-btn--outline:hover {
	border-color: #aaa;
	background: #f7f7f7;
}

.tr-cc-btn--ghost {
	background: transparent;
	color: #666;
	padding-left: 0;
	padding-right: 0;
}

.tr-cc-btn--ghost:hover {
	color: #111;
}

/* ── Expanded preferences view ─────────────────────────── */
#tr-cc-prefs {
	display: flex;
	flex-direction: column;
	gap: 0;
}

#tr-cc-prefs[hidden] {
	display: none !important;
}

#tr-cc-prefs-title {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: #111;
	margin-bottom: 18px;
}

/* ── Category rows ─────────────────────────────────────── */
.tr-cc-category {
	border-top: 1px solid #ebebeb;
	padding: 16px 0;
}

.tr-cc-cat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
}

.tr-cc-cat-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tr-cc-cat-name {
	font-weight: 600;
	font-size: 14px;
	color: #111;
}

.tr-cc-cat-desc {
	font-size: 12.5px;
	color: #666;
	line-height: 1.5;
	max-width: 420px;
}

/* ── Toggle switch ─────────────────────────────────────── */
.tr-cc-toggle {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	cursor: pointer;
	position: relative;
}

.tr-cc-chk {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.tr-cc-slider {
	display: inline-block;
	width: 44px;
	height: 24px;
	background: #d0d0d0;
	border-radius: 24px;
	position: relative;
	transition: background 0.2s ease;
}

.tr-cc-slider::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0,0,0,0.18);
	transition: transform 0.2s ease;
}

.tr-cc-chk:checked + .tr-cc-slider {
	background: #cc2222;
}

.tr-cc-chk:checked + .tr-cc-slider::after {
	transform: translateX(20px);
}

.tr-cc-chk:focus-visible + .tr-cc-slider {
	outline: 2px solid #cc2222;
	outline-offset: 2px;
}

/* Always-on badge */
.tr-cc-toggle--always {
	cursor: default;
}

.tr-cc-always-on {
	font-size: 11.5px;
	font-weight: 600;
	color: #2e7d32;
	background: #e8f5e9;
	border-radius: 20px;
	padding: 4px 10px;
	white-space: nowrap;
}

/* ── Preferences footer buttons ────────────────────────── */
#tr-cc-prefs-btns {
	border-top: 1px solid #ebebeb;
	padding-top: 18px;
	margin-top: 4px;
}

/* ── Floating "Cookie Settings" button (footer) ─────────── */
.tr-cc-reopen-btn {
	background: none;
	border: 1px solid #ccc;
	border-radius: 8px;
	color: #666;
	cursor: pointer;
	font-size: 12px;
	padding: 5px 12px;
	font-family: inherit;
	transition: all 0.15s;
}

.tr-cc-reopen-btn:hover {
	border-color: #999;
	color: #333;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 540px) {
	#tr-cc-banner {
		padding: 20px 18px;
		border-radius: 14px;
	}

	#tr-cc-btns,
	#tr-cc-prefs-btns {
		flex-direction: column;
		align-items: stretch;
	}

	.tr-cc-btn {
		text-align: center;
	}

	.tr-cc-btn--ghost {
		padding-left: 0;
		text-align: center;
	}

	.tr-cc-cat-desc {
		max-width: 100%;
	}
}
