/**
 * Three60 Cookie Frontend Styles
 */

/* Banner container */
.t360-cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 9999999;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	animation: t360SlideUp 0.3s ease-out;
}

.t360-cookie-banner *,
.t360-cookie-banner *::before,
.t360-cookie-banner *::after {
	box-sizing: border-box;
}

@keyframes t360SlideUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Banner Themes */
.t360-cookie-banner.t360-theme-light {
	background-color: #ffffff;
	color: #2c3338;
	border-top: 1px solid #dcdcde;
}

.t360-cookie-banner.t360-theme-dark {
	background-color: #1e1e1e;
	color: #f0f0f1;
	border-top: 1px solid #3c434a;
}

.t360-banner-inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 24px 20px;
}

.t360-banner-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.t360-banner-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: inherit;
}

.t360-banner-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: inherit;
	opacity: 0.6;
	cursor: pointer;
	padding: 0 4px;
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.t360-banner-close:hover {
	opacity: 1;
}

.t360-banner-description {
	margin-bottom: 16px;
	color: inherit;
	opacity: 0.9;
}

.t360-banner-description p {
	margin: 0 0 8px 0;
}

.t360-banner-description p:last-child {
	margin-bottom: 0;
}

/* Policy Links */
.t360-policy-links {
	margin: 12px 0;
	display: flex;
	gap: 15px;
}

.t360-policy-link {
	font-size: 13px;
	text-decoration: underline;
	color: inherit;
	opacity: 0.8;
}

.t360-policy-link:hover {
	opacity: 1;
}

/* Categories accordion/list */
.t360-banner-categories {
	margin: 16px 0;
	padding: 16px;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 6px;
}

.t360-theme-dark .t360-banner-categories {
	background: rgba(255, 255, 255, 0.05);
}

.t360-category-item {
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.t360-theme-dark .t360-category-item {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.t360-category-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.t360-category-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.t360-category-label input[type="checkbox"] {
	cursor: pointer;
	width: 17px;
	height: 17px;
	margin: 0;
}

.t360-badge-required {
	font-size: 12px;
	opacity: 0.7;
	font-weight: normal;
	margin-left: 4px;
}

.t360-category-description {
	margin: 6px 0 0 25px;
	font-size: 12.5px;
	opacity: 0.8;
	line-height: 1.4;
}

/* Actions buttons */
.t360-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 16px;
}

.t360-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 18px;
	font-size: 13.5px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
	line-height: 1.3;
}

.t360-btn-primary { background-color: #2271b1; color: #ffffff; }
.t360-btn-primary:hover { background-color: #135e96; }
.t360-btn-secondary { background-color: transparent; border-color: #8c8f94; color: inherit; }
.t360-btn-secondary:hover { background-color: rgba(0, 0, 0, 0.05); }
.t360-theme-dark .t360-btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); }
.t360-btn-text { background: none; border: none; color: inherit; text-decoration: underline; padding: 8px 12px; opacity: 0.85; }
.t360-btn-text:hover { opacity: 1; }

/* Reopen floating button */
.t360-cookie-reopen {
	position: fixed;
	bottom: 20px;
	z-index: 999998;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: #ffffff;
	color: #2c3338;
	border: 1px solid #dcdcde;
	border-radius: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.t360-cookie-reopen:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.t360-cookie-reopen.t360-theme-dark {
	background: #1e1e1e;
	color: #f0f0f1;
	border-color: #3c434a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.t360-cookie-reopen.t360-theme-dark:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.t360-reopen-bottom-left {
	left: 20px;
}

.t360-reopen-bottom-right {
	right: 20px;
}

/* Declaration table */
.t360-cookie-declaration {
	margin: 24px 0;
	font-size: 14px;
	line-height: 1.6;
	color: inherit;
}

.t360-declaration-intro {
	margin-bottom: 24px;
}

.t360-declaration-intro p {
	margin: 0 0 14px 0;
	line-height: 1.65;
	font-size: 14px;
}

.t360-declaration-intro a {
	color: #2271b1;
	text-decoration: underline;
}

.t360-declaration-intro a:hover {
	color: #135e96;
}

/* Status Box */
.t360-declaration-status-box {
	background: #f6f7f9;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 18px 20px;
	margin: 24px 0 20px 0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	color: #1d2327;
}

.t360-status-item {
	margin-bottom: 10px;
	font-size: 13.5px;
	line-height: 1.5;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	align-items: baseline;
	color: #1d2327;
}

.t360-status-item strong {
	color: #1d2327 !important;
	font-weight: 600;
	min-width: 280px;
}

.t360-status-item code,
.t360-status-item span.t360-status-value {
	background: #eef1f5;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 12.5px;
	font-weight: 600;
	color: #2c3338 !important;
	display: inline-block;
	word-break: break-all;
	border: 1px solid #dcdcde;
}

.t360-status-item code {
	font-family: Consolas, Monaco, "Courier New", Courier, monospace;
}

.t360-status-item span,
.t360-status-value,
#t360-consent-status-label,
#t360-consent-date-label {
	color: #2c3338 !important;
}

.t360-status-actions {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #e2e4e7;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
}

.t360-action-link {
	color: #2271b1;
	text-decoration: underline;
	cursor: pointer;
	transition: color 0.15s ease;
}
.t360-action-link:hover { color: #135e96; }
.t360-action-withdraw { color: #646970; }
.t360-action-withdraw:hover { color: #d63638; }
.t360-action-separator { color: #c3c4c7; user-select: none; }

.t360-declaration-footer-line {
	margin: 28px 0 24px 0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}
.t360-declaration-footer-line a { color: #2271b1; text-decoration: underline; }
.t360-declaration-footer-line a:hover { color: #135e96; }

/* Light Theme: Card with guaranteed dark text and high contrast */
.t360-theme-light.t360-cookie-declaration {
	background-color: #ffffff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 24px 28px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	color: #2c3338 !important;
}
.t360-theme-light.t360-cookie-declaration .t360-declaration-intro,
.t360-theme-light.t360-cookie-declaration .t360-declaration-intro p,
.t360-theme-light.t360-cookie-declaration .t360-cat-desc,
.t360-theme-light.t360-cookie-declaration .t360-empty-cat,
.t360-theme-light.t360-cookie-declaration .t360-declaration-footer-line { color: #2c3338 !important; }
.t360-theme-light.t360-cookie-declaration .t360-cat-title { color: #1d2327 !important; }
.t360-theme-light.t360-cookie-declaration .t360-cat-count { color: #646970 !important; }
.t360-theme-light.t360-cookie-declaration .t360-declaration-status-box { background: #f6f7f9; border: 1px solid #dcdcde; color: #1d2327 !important; }
.t360-theme-light.t360-cookie-declaration .t360-status-item,
.t360-theme-light.t360-cookie-declaration .t360-status-item strong { color: #1d2327 !important; }
.t360-theme-light.t360-cookie-declaration .t360-status-item code,
.t360-theme-light.t360-cookie-declaration .t360-status-item span.t360-status-value,
.t360-theme-light.t360-cookie-declaration #t360-consent-status-label,
.t360-theme-light.t360-cookie-declaration #t360-consent-date-label { background: #eef1f5 !important; color: #2c3338 !important; border: 1px solid #dcdcde !important; }
.t360-theme-light.t360-cookie-declaration .t360-declaration-table th { background: #f6f7f7 !important; color: #1d2327 !important; border-color: #dcdcde !important; }
.t360-theme-light.t360-cookie-declaration .t360-declaration-table td { background: #ffffff !important; color: #2c3338 !important; border-color: #dcdcde !important; }
.t360-theme-light.t360-cookie-declaration .t360-declaration-table td strong,
.t360-theme-light.t360-cookie-declaration .t360-declaration-table td code { color: #2c3338 !important; }

/* Dark Theme: Card with guaranteed light text and high contrast */
.t360-theme-dark.t360-cookie-declaration {
	background-color: #1e1e1e;
	border: 1px solid #3c434a;
	border-radius: 8px;
	padding: 24px 28px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	color: #f0f0f1 !important;
}
.t360-theme-dark.t360-cookie-declaration .t360-declaration-intro,
.t360-theme-dark.t360-cookie-declaration .t360-declaration-intro p,
.t360-theme-dark.t360-cookie-declaration .t360-cat-desc,
.t360-theme-dark.t360-cookie-declaration .t360-empty-cat,
.t360-theme-dark.t360-cookie-declaration .t360-declaration-footer-line { color: #f0f0f1 !important; }
.t360-theme-dark.t360-cookie-declaration .t360-cat-title { color: #ffffff !important; }
.t360-theme-dark.t360-cookie-declaration .t360-cat-count { color: #c3c4c7 !important; }
.t360-theme-dark.t360-cookie-declaration .t360-declaration-status-box { background: #25282c; border: 1px solid #3c434a; color: #f0f0f1 !important; }
.t360-theme-dark.t360-cookie-declaration .t360-status-item,
.t360-theme-dark.t360-cookie-declaration .t360-status-item strong { color: #f0f0f1 !important; }
.t360-theme-dark.t360-cookie-declaration .t360-status-item code,
.t360-theme-dark.t360-cookie-declaration .t360-status-item span.t360-status-value,
.t360-theme-dark.t360-cookie-declaration #t360-consent-status-label,
.t360-theme-dark.t360-cookie-declaration #t360-consent-date-label { background: #2c3338 !important; color: #f0f0f1 !important; border: 1px solid #3c434a !important; }
.t360-theme-dark.t360-cookie-declaration .t360-status-actions { border-top-color: #3c434a; }
.t360-theme-dark.t360-cookie-declaration .t360-declaration-table th { background: #2c3338 !important; color: #f0f0f1 !important; border-color: #3c434a !important; }
.t360-theme-dark.t360-cookie-declaration .t360-declaration-table td { background: #1e1e1e !important; color: #f0f0f1 !important; border-color: #3c434a !important; }
.t360-theme-dark.t360-cookie-declaration .t360-declaration-table td strong,
.t360-theme-dark.t360-cookie-declaration .t360-declaration-table td code { color: #f0f0f1 !important; }

.t360-declaration-status {
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	padding: 12px 16px;
	margin-bottom: 24px;
	border-radius: 0 4px 4px 0;
}

.t360-declaration-category { margin-bottom: 28px; }
.t360-cat-title { margin-bottom: 4px; }
.t360-cat-count { font-weight: normal; opacity: 0.7; font-size: 0.9em; }
.t360-cat-desc { margin-bottom: 12px; opacity: 0.85; }
.t360-table-responsive { overflow-x: auto; }

.t360-declaration-table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0;
}

.t360-declaration-table th,
.t360-declaration-table td {
	padding: 10px 12px;
	border: 1px solid #dcdcde;
	text-align: left;
	font-size: 13.5px;
}

.t360-declaration-table th {
	background: #f6f7f7;
	font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
	.t360-banner-actions { flex-direction: column; align-items: stretch; }
	.t360-btn { width: 100%; }
	.t360-cookie-reopen-label { display: none; }
	.t360-cookie-reopen { padding: 8px; border-radius: 50%; }
	.t360-theme-light.t360-cookie-declaration, .t360-theme-dark.t360-cookie-declaration { padding: 16px 14px; }
}

/* Accessibility: Focus visible */
.t360-btn:focus-visible,
.t360-cookie-reopen:focus-visible,
.t360-banner-close:focus-visible,
.t360-policy-link:focus-visible,
.t360-cat-checkbox:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.t360-cookie-banner { animation: none; }
	.t360-btn, .t360-cookie-reopen, .t360-banner-close { transition: none; }
}
