/**
 * Tomgaz Cookie Consent — frontend styles (all scoped under .tcc-root).
 */

.tcc-root {
	--tcc-bg: #F9E401;
	--tcc-text: #1A1A1A;
	--tcc-accept-bg: #1A1A1A;
	--tcc-accept-tx: #FFFFFF;
	--tcc-reject-bg: #FFFFFF;
	--tcc-reject-tx: #1A1A1A;

	font-family: inherit;
	color: var(--tcc-text);
	box-sizing: border-box;
	z-index: 9999999;
}

.tcc-root *,
.tcc-root *::before,
.tcc-root *::after { box-sizing: border-box; }

/* ── Banner ─────────────────────────────────────────────── */
.tcc-banner {
	position: fixed;
	background: var(--tcc-bg);
	color: var(--tcc-text);
	padding: 22px 24px 20px;
	max-width: 460px;
	width: calc(100vw - 48px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	transform: translateY(140%);
	opacity: 0;
	transition: transform 0.45s ease, opacity 0.35s ease;
	z-index: 9999999;
}

.tcc-root--bottom-left   .tcc-banner { left: 24px; bottom: 24px; }
.tcc-root--bottom-right  .tcc-banner { right: 24px; bottom: 24px; }
.tcc-root--bottom-center .tcc-banner { left: 50%; bottom: 24px; transform: translate(-50%, 140%); }
.tcc-root--bottom-bar    .tcc-banner {
	left: 0; right: 0; bottom: 0;
	max-width: none; width: 100%; padding: 18px 32px;
	display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}

.tcc-root.is-open .tcc-banner                  { transform: translateY(0);   opacity: 1; }
.tcc-root--bottom-center.is-open .tcc-banner   { transform: translate(-50%, 0); opacity: 1; }

.tcc-banner__msg {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 400;
}

.tcc-banner__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.tcc-banner__btn {
	display: inline-flex; align-items: center; justify-content: center;
	gap: 6px; padding: 10px 22px; min-height: 42px;
	font-size: 15px; font-weight: 700; letter-spacing: -0.2px;
	border: none; cursor: pointer; font-family: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.tcc-banner__btn:hover  { transform: translateY(-1px); }
.tcc-banner__btn:active { transform: translateY(0); }
.tcc-banner__btn:focus-visible { outline: 2px solid var(--tcc-text); outline-offset: 2px; }

.tcc-banner__btn--accept { background: var(--tcc-accept-bg); color: var(--tcc-accept-tx); }
.tcc-banner__btn--reject { background: var(--tcc-reject-bg); color: var(--tcc-reject-tx); }
.tcc-banner__btn--save   { background: var(--tcc-accept-bg); color: var(--tcc-accept-tx); }

.tcc-banner__prefs {
	display: inline-block;
	margin-top: 12px;
	background: none; border: none; padding: 2px 0;
	font-family: inherit; font-size: 13px; font-weight: 600;
	color: var(--tcc-text); text-decoration: underline;
	cursor: pointer; opacity: 0.85;
}
.tcc-banner__prefs:hover { opacity: 1; }

/* ── Modal ──────────────────────────────────────────────── */
.tcc-modal[hidden] { display: none; }
.tcc-modal {
	position: fixed; inset: 0; z-index: 10000000;
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
}
.tcc-modal__backdrop {
	position: absolute; inset: 0;
	background: rgba(0,0,0,0.55);
	animation: tccFadeIn 0.25s ease;
}
.tcc-modal__panel {
	position: relative;
	background: #fff; color: #1A1A1A;
	width: 100%; max-width: 560px; max-height: calc(100vh - 40px);
	overflow-y: auto; padding: 32px 32px 24px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.28);
	animation: tccSlideUp 0.32s ease;
}
.tcc-modal__close {
	position: absolute; top: 10px; right: 14px;
	background: none; border: none;
	font-size: 28px; line-height: 1; color: #1A1A1A;
	cursor: pointer; padding: 4px 8px; font-family: inherit;
}
.tcc-modal__close:hover { opacity: 0.7; }
.tcc-modal__title { margin: 0 0 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.tcc-modal__intro { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: #555; }

.tcc-cats { list-style: none; margin: 0; padding: 0; border-top: 1px solid #E5E5E5; }
.tcc-cat  { padding: 14px 0; border-bottom: 1px solid #E5E5E5; }
.tcc-cat__head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; margin-bottom: 6px;
}
.tcc-cat__name   { font-size: 15px; font-weight: 700; }
.tcc-cat__always { font-size: 12px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.6px; }
.tcc-cat__desc   { margin: 0; font-size: 13px; line-height: 1.55; color: #666; }

/* Toggle */
.tcc-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.tcc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tcc-toggle__slider {
	position: absolute; inset: 0; background: #CCC;
	border-radius: 22px; cursor: pointer;
	transition: background 0.25s ease;
}
.tcc-toggle__slider::before {
	content: ""; position: absolute; top: 3px; left: 3px;
	width: 16px; height: 16px; background: #fff; border-radius: 50%;
	transition: transform 0.25s ease;
}
.tcc-toggle input:checked + .tcc-toggle__slider { background: var(--tcc-accept-bg); }
.tcc-toggle input:checked + .tcc-toggle__slider::before { transform: translateX(18px); }
.tcc-toggle input:focus-visible + .tcc-toggle__slider { outline: 2px solid var(--tcc-accept-bg); outline-offset: 2px; }

.tcc-modal__actions {
	display: flex; gap: 10px; margin-top: 20px;
	flex-wrap: wrap; justify-content: flex-end;
}
.tcc-modal__actions .tcc-banner__btn { flex: 1 1 auto; min-width: 120px; }

/* ── Floating manage button ─────────────────────────────── */
.tcc-manage {
	position: fixed; left: 20px; bottom: 20px;
	width: 44px; height: 44px;
	background: var(--tcc-accept-bg); color: var(--tcc-bg);
	border: none; border-radius: 50%; cursor: pointer;
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
	display: inline-flex; align-items: center; justify-content: center;
	z-index: 999998;
	opacity: 0; transform: scale(0.85);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hide the floating "Manage consent" cookie-icon button */
button.tcc-manage { display: none; }
.tcc-root--bottom-right .tcc-manage { left: auto; right: 20px; }
.tcc-manage[hidden] { display: none; }
.tcc-root.is-dismissed .tcc-manage { opacity: 1; transform: scale(1); }
.tcc-manage:hover { transform: scale(1.06); }
.tcc-manage:focus-visible { outline: 2px solid var(--tcc-accept-bg); outline-offset: 3px; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes tccFadeIn  { from { opacity: 0; }                        to { opacity: 1; } }
@keyframes tccSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
	.tcc-banner {
		left: 16px !important; right: 16px !important; bottom: 16px !important;
		width: auto; max-width: none; transform: translateY(140%);
	}
	.tcc-root--bottom-center.is-open .tcc-banner,
	.tcc-root.is-open .tcc-banner { transform: translateY(0); }
	.tcc-modal__panel { padding: 26px 22px 20px; }
	.tcc-modal__title { font-size: 20px; }
}
@media (max-width: 480px) {
	.tcc-banner { padding: 18px 18px 16px; }
	.tcc-banner__msg { font-size: 14px; }
	.tcc-banner__actions { gap: 8px; }
	.tcc-banner__btn { flex: 1 1 auto; min-width: 0; padding: 10px 14px; font-size: 14px; }
	.tcc-modal__actions { flex-direction: column; }
	.tcc-modal__actions .tcc-banner__btn { width: 100%; }
}
