/**
 * Bistorming Consent — banner styles (mobile-first).
 * Όλα namespaced με .bc- ώστε να μη συγκρούονται με το theme.
 */

.bc-banner,
.bc-modal,
.bc-manage {
	/* Defaults — ο banner enqueue τα κάνει override μέσω inline CSS variables */
	--bc-bg: #1d1d1f;
	--bc-text: #f5f5f7;
	/* Κουμπί «Αποδοχή» */
	--bc-btn1-bg: #3D7D8A;
	--bc-btn1-text: #ffffff;
	--bc-btn1-border: #3D7D8A;
	/* Κουμπιά «Προτιμήσεις/Απόρριψη» */
	--bc-btn2-bg: #3a3a3c;
	--bc-btn2-text: #f5f5f7;
	--bc-btn2-border: #3a3a3c;
	/* Floating κουμπί «Ρυθμίσεις Cookies» */
	--bc-manage-bg: #1d1d1f;
	--bc-manage-text: #f5f5f7;
	--bc-manage-border: #3a3a3c;
	/* Κουμπί κλεισίματος «×» */
	--bc-close: #f5f5f7;
	--bc-close-bg: transparent;
	--bc-close-border: transparent;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--bc-text);
}

.bc-banner *,
.bc-modal * {
	box-sizing: border-box;
}

/* Το hidden attribute κρύβει πλήρως (το JS το αφαιρεί) */
.bc-banner[hidden],
.bc-modal[hidden],
.bc-manage[hidden] {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * Bottom bar banner
 * ---------------------------------------------------------------------- */
.bc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483600; /* πάνω από σχεδόν τα πάντα */
	background: var(--bc-bg);
	border-top: 1px solid #3a3a3c;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
	padding: 16px;
	animation: bc-slide-up 0.25s ease-out;
}

/* Box variant (corner) — αντί για full-width bar */
.bc-banner--box {
	left: auto;
	right: 16px;
	bottom: 16px;
	max-width: 400px;
	border: 1px solid #3a3a3c;
	border-radius: 14px;
}
.bc-banner--box .bc-banner__inner {
	flex-direction: column;
	align-items: stretch;
}
.bc-banner--box .bc-banner__actions {
	flex-wrap: wrap;
}
.bc-banner--box .bc-btn {
	flex: 1 1 auto;
}

@keyframes bc-slide-up {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

.bc-banner__inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.bc-banner__title {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 600;
}

.bc-banner__desc {
	margin: 0;
	font-size: 14px;
}

/* Χρώματα κειμένου — ID-scoped ώστε να υπερισχύουν των theme styles (π.χ. h2) */
#vtr-consent-banner .bc-banner__title,
#vtr-consent-banner .bc-banner__desc,
#vtr-consent-modal .bc-modal__title,
#vtr-consent-modal .bc-cat__title {
	color: var(--bc-text);
}
#vtr-consent-banner .bc-banner__desc,
#vtr-consent-modal .bc-cat__desc {
	color: var(--bc-text);
	opacity: 0.75;
}

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

/* -------------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------------- */
.bc-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease;
	flex: 1 1 auto;
	min-height: 44px; /* touch target */
}

.bc-btn:focus-visible {
	outline: 3px solid var(--bc-btn1-bg);
	outline-offset: 2px;
}

/* ID-scoped (specificity 1,1,0) ώστε να υπερισχύουν των theme button styles */
#vtr-consent-banner .bc-btn--primary,
#vtr-consent-modal .bc-btn--primary {
	background: var(--bc-btn1-bg);
	color: var(--bc-btn1-text);
	border-color: var(--bc-btn1-border);
}
#vtr-consent-banner .bc-btn--primary:hover,
#vtr-consent-modal .bc-btn--primary:hover { filter: brightness(0.92); }

#vtr-consent-banner .bc-btn--secondary,
#vtr-consent-modal .bc-btn--secondary {
	background: var(--bc-btn2-bg);
	color: var(--bc-btn2-text);
	border-color: var(--bc-btn2-border);
}
#vtr-consent-banner .bc-btn--secondary:hover,
#vtr-consent-modal .bc-btn--secondary:hover { filter: brightness(1.12); }

/* -------------------------------------------------------------------------
 * Preferences modal
 * ---------------------------------------------------------------------- */
.bc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483601;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.bc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.bc-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 85vh;
	overflow-y: auto;
	background: var(--bc-bg);
	border: 1px solid #3a3a3c;
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.bc-modal__title {
	margin: 0 0 16px;
	font-size: 19px;
	font-weight: 600;
}

.bc-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.7;
}
/* ID-scoped (στατικά + hover + focus) ώστε να μην τα πατάει καθόλου το theme */
#vtr-consent-modal .bc-modal__close {
	background: var(--bc-close-bg);
	color: var(--bc-close);
	border: 1px solid var(--bc-close-border);
}
#vtr-consent-modal .bc-modal__close:hover { opacity: 1; filter: brightness(1.25); }
#vtr-consent-modal .bc-modal__close:focus-visible { outline: 3px solid var(--bc-btn1-bg); outline-offset: 2px; }

.bc-modal__cats {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 20px;
}

.bc-cat {
	padding: 14px 0;
	border-bottom: 1px solid #2c2c2e;
}
.bc-cat:last-child { border-bottom: 0; }

.bc-cat__label {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-weight: 600;
}

.bc-cat__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

/* iOS-style switch */
.bc-cat__switch {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 26px;
	border-radius: 13px;
	background: #48484a;
	transition: background 0.2s ease;
}
.bc-cat__switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s ease;
}
.bc-cat__input:checked + .bc-cat__switch {
	background: #34c759;
}
.bc-cat__input:checked + .bc-cat__switch::after {
	transform: translateX(18px);
}
.bc-cat__input:disabled + .bc-cat__switch {
	opacity: 0.6;
	cursor: not-allowed;
}
.bc-cat__input:focus-visible + .bc-cat__switch {
	outline: 3px solid var(--bc-btn1-bg);
	outline-offset: 2px;
}

.bc-cat__title { font-size: 15px; }

.bc-cat__desc {
	margin: 6px 0 0 56px;
	font-size: 13px;
	color: #aeaeb2;
}

.bc-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* -------------------------------------------------------------------------
 * "Manage consent" floating button
 * ---------------------------------------------------------------------- */
.bc-manage {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147483599;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
/* ID-scoped χρώματα ώστε να υπερισχύουν των theme button styles */
#vtr-consent-manage.bc-manage {
	background: var(--bc-manage-bg);
	color: var(--bc-manage-text);
	border: 1px solid var(--bc-manage-border);
}
#vtr-consent-manage.bc-manage:hover { filter: brightness(1.3); }
#vtr-consent-manage.bc-manage:focus-visible { outline: 3px solid var(--bc-btn1-bg); outline-offset: 2px; }

/* -------------------------------------------------------------------------
 * Desktop
 * ---------------------------------------------------------------------- */
@media (min-width: 768px) {
	.bc-banner__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.bc-banner__text { flex: 1 1 auto; }
	.bc-banner__actions {
		flex: 0 0 auto;
		flex-wrap: nowrap;
	}
	.bc-btn { flex: 0 0 auto; }
}

/* -------------------------------------------------------------------------
 * Reduced motion
 * ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.bc-banner { animation: none; }
	.bc-btn,
	.bc-cat__switch,
	.bc-cat__switch::after { transition: none; }
}
