/* =========================================================
   TM Cookies — Banner Styles
   ========================================================= */

/* ----------------------------------------------------------
   Persistent settings toggle (bottom-left cookie icon)
   ---------------------------------------------------------- */
.tm-cookie-settings-toggle {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 9998;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1.5px solid #e4e4e4;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	color: #888;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tm-cookie-settings-toggle:hover {
	background: #27c2eb;
	color: #ffffff;
	border-color: #27c2eb;
	box-shadow: 0 4px 14px rgba(39, 194, 235, 0.35);
}

.tm-cookie-settings-toggle:active {
	background: #1aa8cf;
}

@media (max-width: 480px) {
	.tm-cookie-settings-toggle {
		bottom: 14px;
		left: 14px;
		width: 36px;
		height: 36px;
	}
}

/* ----------------------------------------------------------
   Banner panel — anchored bottom-left
   ---------------------------------------------------------- */
.tm-cookie-banner {
	position: fixed;
	bottom: 70px;
	left: 20px;
	z-index: 9999;
	background: #ffffff;
	border: 1px solid #e8e8e8;
	border-radius: 14px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
	max-width: 380px;
	width: calc(100vw - 40px);
	max-height: 88vh;
	overflow-y: auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #2a2a2a;
	scrollbar-width: thin;
	scrollbar-color: #e0e0e0 transparent;
}

.tm-cookie-banner::-webkit-scrollbar {
	width: 4px;
}
.tm-cookie-banner::-webkit-scrollbar-thumb {
	background: #e0e0e0;
	border-radius: 4px;
}

/* ----------------------------------------------------------
   Content wrapper
   ---------------------------------------------------------- */
.tm-cookie-banner__content {
	padding: 22px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ----------------------------------------------------------
   Header text
   ---------------------------------------------------------- */
.tm-cookie-banner__text h3 {
	margin: 0 0 6px 0;
	font-size: 15px;
	font-weight: 600;
	color: #111;
	letter-spacing: -0.01em;
}

.tm-cookie-banner__text p {
	margin: 0;
	font-size: 12.5px;
	color: #777;
	line-height: 1.6;
}

/* ----------------------------------------------------------
   Toggle rows
   ---------------------------------------------------------- */
.tm-cookie-banner__toggles {
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-top: 1px solid #f2f2f2;
	border-bottom: 1px solid #f2f2f2;
	padding: 14px 0;
}

.tm-cookie-toggle {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.tm-cookie-toggle label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

/* Custom checkbox */
.tm-cookie-toggle input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 17px;
	height: 17px;
	border: 1.5px solid #d0d0d0;
	border-radius: 4px;
	cursor: pointer;
	flex-shrink: 0;
	background: #fff;
	transition: background 0.15s ease, border-color 0.15s ease;
	position: relative;
}

.tm-cookie-toggle input[type="checkbox"]:checked {
	background: #27c2eb;
	border-color: #27c2eb;
}

.tm-cookie-toggle input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1.5px;
	width: 5px;
	height: 9px;
	border: 2px solid #fff;
	border-top: none;
	border-left: none;
	transform: rotate(45deg);
}

.tm-cookie-toggle input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.tm-cookie-toggle__label {
	font-weight: 600;
	color: #1a1a1a;
	font-size: 13.5px;
}

.tm-cookie-toggle__badge {
	font-size: 10.5px;
	background: #f2f2f2;
	color: #999;
	padding: 2px 7px;
	border-radius: 20px;
	margin-left: auto;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.tm-cookie-toggle__hint {
	margin: 0;
	font-size: 11.5px;
	color: #aaa;
	line-height: 1.45;
}

/* ----------------------------------------------------------
   Action buttons
   ---------------------------------------------------------- */
.tm-cookie-banner__actions {
	display: flex;
	gap: 8px;
}

.tm-cookie-btn {
	padding: 9px 14px;
	border: none;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
	white-space: nowrap;
	flex: 1;
	letter-spacing: 0.01em;
}

.tm-cookie-btn--primary {
	background: #27c2eb;
	color: #ffffff;
	border: none;
	box-shadow: 0 2px 8px rgba(39, 194, 235, 0.25);
}

.tm-cookie-btn--primary:hover {
	background: #1aa8cf;
	box-shadow: 0 4px 14px rgba(39, 194, 235, 0.35);
}

.tm-cookie-btn--primary:active {
	background: #1596ba;
}

.tm-cookie-btn--secondary {
	background: #f5f5f5;
	color: #444;
	border: 1px solid #e8e8e8;
}

.tm-cookie-btn--secondary:hover {
	background: #27c2eb;
	color: #ffffff;
	border-color: #27c2eb;
}

.tm-cookie-btn--secondary:active {
	background: #1aa8cf;
	color: #ffffff;
}

/* ----------------------------------------------------------
   Mobile
   ---------------------------------------------------------- */
@media (max-width: 480px) {
	.tm-cookie-banner {
		left: 12px;
		right: 12px;
		bottom: 66px;
		max-width: 100%;
		width: auto;
		border-radius: 12px;
	}

	.tm-cookie-banner__content {
		padding: 18px 16px 16px;
		gap: 14px;
	}

	.tm-cookie-banner__actions {
		flex-wrap: wrap;
	}

	.tm-cookie-btn {
		flex: 1 1 calc(50% - 4px);
	}

	.tm-cookie-btn:last-child:nth-child(odd) {
		flex: 1 1 100%;
	}
}
