/*
 * PA Cookie Consent - style pomocnicze frontendu.
 * Kolory/motyw banera są ustawiane bezpośrednio jako zmienne --cc-* w <head>
 * przez PA_CC_Frontend::print_custom_css() (patrz includes/class-pa-cc-frontend.php),
 * z poszanowaniem trybu ciemnego (klasa "cc--darkmode" na <html>) - nic tu nie nadpisujemy.
 */

.pa-cc-logo {
	max-height: 32px;
	margin-bottom: 8px;
}

.pa-cc-revoke-link {
	cursor: pointer;
}

.pa-cc-categories-table {
	width: 100%;
	border-collapse: collapse;
}

.pa-cc-categories-table th,
.pa-cc-categories-table td {
	border: 1px solid #e2e2e2;
	padding: 8px 12px;
	text-align: left;
}

/*
 * Górny pasek nagłówkowy (logotyp witryny + plakietka "Cookies by Pageart") -
 * wstawiany przez assets/js/pa-cookie-consent-init.js (funkcja injectBranding) jako
 * WŁASNY WIERSZ na samej górze banera/panelu preferencji (nie jako nakładka
 * position:absolute na istniejącą treść - to celowo, żeby nigdy nie nachodził na
 * tytuł, przycisk zamknięcia ani przyciski akcji, niezależnie od układu banera).
 *
 * box-sizing: border-box jest tu krytyczne - bez tego padding doliczałby się do
 * width: 100% i pasek wystawałby poza zaokrąglone rogi modala (dokładnie to, co
 * się wcześniej działo - "Pageart" ucięte przy prawej krawędzi).
 */
.pa-cc-header-row {
	box-sizing: border-box;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px 10px;
}

.pa-cc-site-logo {
	display: block;
	max-height: 22px;
	max-width: 140px;
	width: auto;
	height: auto;
}

.pa-cc-branding {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	line-height: 1;
	opacity: 0.85;
	transition: opacity .15s ease;
	white-space: nowrap;
}

.pa-cc-branding:hover {
	opacity: 1;
}

.pa-cc-branding-label {
	font-size: 11px;
	color: var( --cc-secondary-color, #6b7280 );
}

.pa-cc-branding-logo {
	display: block;
	width: 16px;
	height: 16px;
	border-radius: 3px;
	flex: 0 0 auto;
}

.pa-cc-branding-name {
	font-size: 12px;
	font-weight: 600;
	color: var( --cc-primary-color, #1c1c1c );
}

@media ( max-width: 480px ) {
	.pa-cc-header-row {
		padding: 12px 16px 8px;
	}

	.pa-cc-branding-label {
		display: none;
	}
}

/*
 * Pływający przycisk cookies (assets/js/pa-cookie-consent-init.js, buildFloatButton).
 * Rozmiar, kolory i odstępy pochodzą ze zmiennych --pa-cc-float-* ustawianych w <head>.
 */
.pa-cc-float {
	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var( --pa-cc-float-size, 56px );
	height: var( --pa-cc-float-size, 56px );
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var( --pa-cc-float-bg, #1a73e8 );
	color: var( --pa-cc-float-icon, #ffffff );
	box-shadow: 0 4px 14px rgba( 0, 0, 0, .25 );
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease, visibility .15s;
}

.pa-cc-float svg {
	display: block;
	width: 55%;
	height: 55%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pa-cc-float:hover {
	transform: scale( 1.08 );
}

.pa-cc-float:focus-visible {
	outline: 3px solid var( --pa-cc-float-bg, #1a73e8 );
	outline-offset: 3px;
}

.pa-cc-float--hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: scale( .8 );
}

.pa-cc-float--bottom-left { left: var( --pa-cc-float-x, 20px ); bottom: var( --pa-cc-float-y, 20px ); }
.pa-cc-float--bottom-right { right: var( --pa-cc-float-x, 20px ); bottom: var( --pa-cc-float-y, 20px ); }
.pa-cc-float--top-left { left: var( --pa-cc-float-x, 20px ); top: var( --pa-cc-float-y, 20px ); }
.pa-cc-float--top-right { right: var( --pa-cc-float-x, 20px ); top: var( --pa-cc-float-y, 20px ); }
.pa-cc-float--middle-left { left: var( --pa-cc-float-x, 20px ); top: 50%; margin-top: calc( var( --pa-cc-float-size, 56px ) / -2 ); }
.pa-cc-float--middle-right { right: var( --pa-cc-float-x, 20px ); top: 50%; margin-top: calc( var( --pa-cc-float-size, 56px ) / -2 ); }

@media ( max-width: 768px ) {
	.pa-cc-float--hide-mobile {
		display: none;
	}
}
