/* THS Cookie Consent - front-end styles */

.thscc-banner {
	position: fixed;
	z-index: 999999;
	background: #ffffff;
	color: #1a1a1a;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}

.thscc-banner * {
	box-sizing: border-box;
}

.thscc-banner.thscc-bottom_bar {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	border-top: 3px solid var(--thscc-accent, #1d4ed8);
}

.thscc-banner.thscc-bottom_left,
.thscc-banner.thscc-bottom_right {
	bottom: 20px;
	max-width: 420px;
	width: calc(100% - 40px);
	border-radius: 10px;
	border-top: 4px solid var(--thscc-accent, #1d4ed8);
}

.thscc-banner.thscc-bottom_left {
	left: 20px;
}

.thscc-banner.thscc-bottom_right {
	right: 20px;
}

.thscc-banner.thscc-center_modal {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 360px;
	width: calc(100% - 40px);
	border-radius: 14px;
	border-top: 4px solid var(--thscc-accent, #32b68b);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
	text-align: center;
}

.thscc-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999998;
}

.thscc-modal-backdrop[hidden] {
	display: none !important;
}

.thscc-banner[hidden] {
	display: none !important;
}

/* Some themes force `display` on all buttons/elements, which breaks the
   native [hidden] behaviour for things like the Save Preferences button.
   Force it back off explicitly for anything hidden inside the banner. */
.thscc-banner [hidden] {
	display: none !important;
}

.thscc-banner-inner {
	padding: 18px 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
}

.thscc-message {
	margin: 0;
	flex: 1 1 320px;
}

.thscc-message a {
	color: var(--thscc-accent, #1d4ed8);
	text-decoration: underline;
	margin-left: 4px;
}

.thscc-categories {
	flex: 1 1 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	padding: 10px 0;
	border-top: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
}

.thscc-categories[hidden] {
	display: none;
}

.thscc-cat {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	cursor: pointer;
}

.thscc-cat span {
	font-weight: 400;
	color: #666;
	font-size: 12px;
}

.thscc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 0 0 auto;
}

.thscc-center_modal .thscc-banner-inner {
	flex-direction: column;
	padding: 22px 22px 18px;
}

.thscc-center_modal .thscc-message {
	flex: 1 1 100%;
}

.thscc-center_modal .thscc-categories {
	justify-content: center;
	text-align: left;
}

.thscc-center_modal .thscc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	width: 100%;
}

/* Accept + Reject sit side by side on the top row */
.thscc-center_modal .thscc-btn-solid,
.thscc-center_modal .thscc-btn-outline {
	flex: 1 1 0;
}

/* Customise / Save Preferences sit on their own centred row underneath */
.thscc-center_modal .thscc-btn-link,
.thscc-center_modal .thscc-btn-save {
	flex: 1 1 100%;
	width: 100%;
	text-align: center;
}

.thscc-center_modal .thscc-btn-solid {
	order: 1;
	padding: 12px 16px;
	font-size: 14px;
}

.thscc-center_modal .thscc-btn-outline {
	order: 2;
	background: transparent;
	border: none;
	color: #666;
	text-decoration: underline;
	font-size: 13px;
	padding: 9px 4px;
}

.thscc-center_modal .thscc-btn-save {
	order: 3;
}

.thscc-center_modal .thscc-btn-link {
	order: 3;
	font-size: 12px;
	padding: 4px;
}

.thscc-btn {
	cursor: pointer;
	border-radius: 6px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 600;
	border: 1px solid transparent;
	line-height: 1.2;
}

.thscc-btn-solid {
	background: var(--thscc-accent, #1d4ed8);
	color: #fff;
}

.thscc-btn-outline {
	background: transparent;
	border-color: #c9c9c9;
	color: #1a1a1a;
}

.thscc-btn-link {
	background: transparent;
	color: var(--thscc-accent, #1d4ed8);
	border: none;
	text-decoration: underline;
	padding: 9px 4px;
}

.thscc-btn-save {
	background: #1a1a1a;
	color: #fff;
}

.thscc-btn:hover {
	opacity: 0.88;
}

.thscc-reopen-link {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 12px;
	cursor: pointer;
	opacity: 0.85;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.thscc-reopen-link:hover {
	opacity: 1;
}

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

	.thscc-buttons {
		flex-direction: column;
	}

	.thscc-btn {
		width: 100%;
		text-align: center;
	}
}

/* -----------------------------------------------------------------------
 * Hardened overrides.
 * Many WordPress themes apply their own global button/link styling
 * (colour, border, uppercase text, underline) with high specificity or
 * !important, which then bleeds into any button the plugin adds. The
 * rules below target the banner's buttons by their unique IDs and use
 * !important to make sure the plugin's own colours and styling always
 * win, regardless of the active theme.
 * ---------------------------------------------------------------------*/

#thscc-banner button {
	-webkit-appearance: none !important;
	appearance: none !important;
	margin: 0 !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

#thscc-accept {
	background-color: var(--thscc-accent, #32b68b) !important;
	border-color: var(--thscc-accent, #32b68b) !important;
	color: #ffffff !important;
	text-decoration: none !important;
	text-transform: none !important;
	font-weight: 600 !important;
}

#thscc-reject {
	background-color: transparent !important;
	border: none !important;
	color: #666666 !important;
	text-decoration: underline !important;
	text-transform: none !important;
	font-weight: 600 !important;
}

#thscc-customize {
	background-color: transparent !important;
	border: none !important;
	color: var(--thscc-accent, #32b68b) !important;
	text-decoration: underline !important;
	text-transform: none !important;
	font-weight: 600 !important;
}

#thscc-save {
	background-color: #1a1a1a !important;
	border-color: #1a1a1a !important;
	color: #ffffff !important;
	text-decoration: none !important;
	text-transform: none !important;
	font-weight: 600 !important;
}

#thscc-reopen-link {
	background-color: #1a1a1a !important;
	border: none !important;
	color: #ffffff !important;
	text-decoration: none !important;
	text-transform: none !important;
}
