/**
 * 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;
	}
}

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

.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;
}

.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%;
	}
}

/* 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;
	}
}
