/* Trust Armory — public styles
   All colours reference CSS variables so admin colour settings apply
   without needing to regenerate this file. */

:root {
	--trust-armory-bg: #1f3a93;
	--trust-armory-text: #ffffff;
	--trust-armory-accent: #2c7be5;
}

.trust-armory-banner,
.trust-armory-modal {
	box-sizing: border-box;
}

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

/* Banner */

.trust-armory-banner {
	position: fixed;
	z-index: 999998;
	font-size: 14px;
	line-height: 1.5;
}

.trust-armory-banner[hidden] {
	display: none;
}

/* Bar style: full-width strip pinned to the top or bottom edge */

.trust-armory-banner-style-bar {
	left: 0;
	right: 0;
	background: var(--trust-armory-bg);
	color: var(--trust-armory-text);
	padding: 16px 20px;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}

.trust-armory-position-bottom {
	bottom: 0;
}

.trust-armory-position-top {
	top: 0;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Popup style: dimmed overlay with a centred card */

.trust-armory-banner-style-popup {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 20, 25, 0.55);
	padding: 20px;
}

.trust-armory-banner-style-popup[hidden] {
	display: none;
}

.trust-armory-banner-style-popup .trust-armory-banner-inner {
	background: var(--trust-armory-bg);
	color: var(--trust-armory-text);
	flex-direction: column;
	/* Bug fix: the general .trust-armory-banner-inner rule leaves
	   flex-wrap: wrap in place. In row mode (bar style) that just wraps
	   text; in column mode (popup style) it lets the flex container
	   start a SECOND COLUMN once content exceeds max-height, instead of
	   scrolling — which is why setting a fixed height moved the
	   buttons beside the text. Popups never need more than one column. */
	flex-wrap: nowrap;
	align-items: flex-start;
	/* Bug fix: the general .trust-armory-banner-inner rule sets
	   margin: 0 auto, which self-centers a flex item horizontally
	   REGARDLESS of the parent's justify-content — silently
	   overriding every popup position except centred ones. */
	margin: 0;
	max-width: var(--trust-armory-popup-width, 440px);
	width: 100%;
	max-height: var(--trust-armory-popup-max-height, none);
	overflow-y: auto;
	overflow-x: hidden;
	padding: 24px;
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.trust-armory-banner-style-popup .trust-armory-banner-message {
	/* Bug fix: the general .trust-armory-banner-message rule sets
	   flex: 1 1 320px. That 320px is a WIDTH basis in the bar style's
	   row layout, but becomes a HEIGHT basis once the popup style
	   switches to column layout above — reserving far more vertical
	   space than the text needs, which is why the auto-height popup
	   was rendering much taller than its content. */
	flex: 0 0 auto;
	width: 100%;
}

.trust-armory-banner-style-popup .trust-armory-banner-actions {
	width: 100%;
	justify-content: flex-start;
}

.trust-armory-banner-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.trust-armory-banner-message {
	margin: 0;
	flex: 1 1 320px;
}

.trust-armory-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.trust-armory-credit {
	margin: 6px 0 0;
	flex-basis: 100%;
	text-align: right;
	font-size: 11px;
	opacity: 0.75;
}

.trust-armory-credit a {
	color: inherit;
	text-decoration: underline;
}

.trust-armory-banner-style-popup .trust-armory-credit {
	text-align: left;
}

/* Buttons */

.trust-armory-btn {
	font-size: 14px;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid transparent;
	font-family: inherit;
}

.trust-armory-btn-primary {
	background: var(--trust-armory-accent);
	color: #ffffff;
	border-color: var(--trust-armory-accent);
}

.trust-armory-btn-outline {
	background: transparent;
	color: inherit;
	border-color: currentColor;
}

.trust-armory-btn:focus-visible {
	outline: 2px solid var(--trust-armory-accent);
	outline-offset: 2px;
}

/* Cookie Settings shortcode link */

.trust-armory-settings-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--trust-armory-accent);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* Modal */

.trust-armory-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.trust-armory-modal[hidden] {
	display: none;
}

.trust-armory-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.trust-armory-modal-panel {
	position: relative;
	background: #ffffff;
	color: #1f2933;
	max-width: 480px;
	width: calc(100% - 32px);
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	border-radius: 8px;
	padding: 0;
}

.trust-armory-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
}

.trust-armory-modal-header h2 {
	margin: 0;
	font-size: 18px;
}

.trust-armory-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.trust-armory-modal-body {
	padding: 20px 24px;
}

.trust-armory-category-row {
	margin-bottom: 16px;
}

.trust-armory-category-row:last-child {
	margin-bottom: 0;
}

.trust-armory-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.trust-armory-category-description {
	margin: 4px 0 0 24px;
	font-size: 13px;
	color: #52606d;
}

.trust-armory-script-list {
	margin: 10px 0 0 24px;
	padding: 8px 10px;
	background: #f6f7f7;
	border-radius: 4px;
}

.trust-armory-script-list-heading {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #52606d;
}

.trust-armory-script-list-empty {
	margin: 8px 0 0 24px;
	font-size: 12px;
	font-style: italic;
	color: #98a2ae;
}

.trust-armory-script-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 4px 0;
	font-weight: 400;
	cursor: pointer;
}

.trust-armory-script-row input {
	margin-top: 3px;
}

.trust-armory-script-description {
	display: block;
	font-size: 12px;
	color: #52606d;
	font-weight: 400;
}

.trust-armory-script-list-inactive {
	background: transparent;
	border: 1px dashed #d8dbdf;
}

.trust-armory-script-list-inactive summary {
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: #52606d;
}

.trust-armory-inactive-row {
	margin: 6px 0;
	font-size: 12px;
	color: #52606d;
}

.trust-armory-inactive-row em {
	color: #98a2ae;
}

.trust-armory-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 16px 24px;
	border-top: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
	.trust-armory-banner-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.trust-armory-banner-actions {
		justify-content: stretch;
	}

	.trust-armory-banner-actions .trust-armory-btn {
		flex: 1 1 auto;
	}
}

/* Floating "Cookie Settings" button */

.trust-armory-fab {
	position: fixed;
	z-index: 999997;
	width: var(--ta-fab-size, 52px);
	height: var(--ta-fab-size, 52px);
	background: var(--ta-fab-bg, #1f2933);
	color: var(--ta-fab-icon-color, #ffffff);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.trust-armory-fab-circle {
	border-radius: 50%;
}

.trust-armory-fab-square {
	border-radius: 12px;
}

.trust-armory-fab-shadow {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.trust-armory-fab-bottom {
	bottom: var(--ta-fab-offset-y, 20px);
}

.trust-armory-fab-top {
	top: var(--ta-fab-offset-y, 20px);
}

.trust-armory-fab-left {
	left: var(--ta-fab-offset-x, 20px);
}

.trust-armory-fab-right {
	right: var(--ta-fab-offset-x, 20px);
}

.trust-armory-fab:hover,
.trust-armory-fab:focus-visible {
	background: var(--ta-fab-hover-bg, #2f6feb);
	color: var(--ta-fab-icon-hover-color, var(--ta-fab-icon-color, #ffffff));
	transform: scale(1.06);
}

.trust-armory-fab:focus-visible {
	outline: 2px solid var(--ta-fab-hover-bg, #2f6feb);
	outline-offset: 3px;
}

.trust-armory-fab-icon {
	width: var(--ta-fab-icon-size, 28px);
	height: var(--ta-fab-icon-size, 28px);
	display: inline-flex;
}

.trust-armory-fab-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.trust-armory-fab-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.trust-armory-fab-icon-mask {
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--ta-fab-icon-color, #ffffff);
	-webkit-mask-image: var(--ta-fab-mask-url);
	mask-image: var(--ta-fab-mask-url);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.trust-armory-fab:hover .trust-armory-fab-icon-mask,
.trust-armory-fab:focus-visible .trust-armory-fab-icon-mask {
	background-color: var(--ta-fab-icon-hover-color, var(--ta-fab-icon-color, #ffffff));
}

/* Simple CSS tooltip, shown on hover/focus only */

.trust-armory-fab[data-trust-armory-tooltip] {
	position: fixed;
}

.trust-armory-fab[data-trust-armory-tooltip]::after {
	content: attr(data-trust-armory-tooltip);
	position: absolute;
	white-space: nowrap;
	background: #1f2933;
	color: #ffffff;
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 4px;
	opacity: 0;
	pointer-events: none;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.trust-armory-fab-left[data-trust-armory-tooltip]::after {
	left: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%) translateX(-4px);
}

.trust-armory-fab-right[data-trust-armory-tooltip]::after {
	right: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%) translateX(4px);
}

.trust-armory-fab[data-trust-armory-tooltip]:hover::after,
.trust-armory-fab[data-trust-armory-tooltip]:focus-visible::after {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

.trust-armory-fab-hide-mobile {
	display: flex;
}

@media (max-width: 600px) {
	.trust-armory-fab-hide-mobile {
		display: none;
	}
}

