/**
 * Teb Open — Footer + trust/bottom-nav extras that live at page end.
 */

/* ---------- Footer shell ---------- */
.to-footer {
	flex-shrink: 0;
	background: var(--to-surface-invert);
	color: var(--to-text-invert-2);
	margin-top: auto;
	padding-top: var(--to-space-7);
}

.to-footer__grid {
	display: grid;
	gap: var(--to-space-6);
	grid-template-columns: 1fr;
	padding-bottom: var(--to-space-6);
}

@media (min-width: 576px) {
	.to-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.to-footer__grid {
		grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	}
}

.to-footer__col--brand .custom-logo-link {
	display: inline-block;
	margin-bottom: var(--to-space-3);
	max-width: 200px;
}

.to-footer__brand {
	font-size: var(--to-fs-xl);
	font-weight: 800;
	color: var(--to-text-invert);
}

.to-footer__about {
	font-size: var(--to-fs-s);
	line-height: 1.9;
	color: var(--to-text-invert-2);
	max-width: 40ch;
}

.to-footer__title {
	font-size: var(--to-fs-base);
	font-weight: 700;
	color: var(--to-text-invert);
	margin-bottom: var(--to-space-4);
}

.to-footer__links {
	list-style: none;
	display: grid;
	gap: 10px;
}

.to-footer__links a {
	color: var(--to-text-invert-2);
	font-size: var(--to-fs-s);
	transition: color var(--to-dur-fast) var(--to-ease);
}

.to-footer__links a:hover {
	color: var(--to-primary);
}

.to-footer__contact {
	list-style: none;
	display: grid;
	gap: 12px;
	font-size: var(--to-fs-s);
}

.to-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.to-footer__contact .to-icon {
	color: var(--to-primary);
	margin-top: 3px;
	width: 18px;
	height: 18px;
}

.to-footer__contact a {
	color: var(--to-text-invert-2);
}

.to-footer__contact a:hover {
	color: var(--to-primary);
}

.to-footer__trust {
	margin-top: var(--to-space-4);
	padding-top: var(--to-space-4);
	border-top: 1px solid var(--to-surface-invert-2);
	display: flex;
	gap: var(--to-space-3);
	align-items: center;
}

.to-footer__trust img {
	border-radius: var(--to-radius-s);
	background: #fff;
	padding: 4px;
	max-height: 72px;
	width: auto;
}

/* ---------- Socials ---------- */
.to-socials {
	list-style: none;
	display: flex;
	gap: var(--to-space-2);
	margin-top: var(--to-space-4);
}

.to-socials a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: var(--to-radius-m);
	background: var(--to-surface-invert-2);
	color: var(--to-text-invert-2);
	transition: background var(--to-dur-fast) var(--to-ease), color var(--to-dur-fast) var(--to-ease), transform var(--to-dur-fast) var(--to-ease);
}

.to-socials a:hover {
	background: var(--to-primary-strong);
	color: #fff;
	transform: translateY(-2px);
}

.to-socials .to-icon {
	width: 20px;
	height: 20px;
}

/* ---------- Footer bottom bar ---------- */
.to-footer__bar {
	border-top: 1px solid var(--to-surface-invert-2);
	padding-block: var(--to-space-4);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--to-space-2);
	font-size: var(--to-fs-s);
}

@media (min-width: 768px) {
	.to-footer__bar {
		flex-direction: row;
		justify-content: space-between;
	}
}

.to-footer__copy {
	margin: 0;
	color: var(--to-text-invert-2);
}

.to-footer__legal {
	display: flex;
	gap: var(--to-space-4);
}

.to-footer__legal a {
	color: var(--to-text-invert-2);
}

.to-footer__legal a:hover {
	color: var(--to-primary);
}

/* ---------- Bottom mobile nav ---------- */
.to-bottomnav {
	position: fixed;
	bottom: 0;
	inset-inline: 0;
	z-index: var(--to-z-header);
	background: color-mix(in srgb, var(--to-surface) 94%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-top: 1px solid var(--to-border);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	padding-block: 6px;
	padding-bottom: max(6px, env(safe-area-inset-bottom));
	transform: translateY(0);
	transition: transform var(--to-dur) var(--to-ease);
}

.to-bottomnav.is-hidden {
	transform: translateY(110%);
}

@media (min-width: 1024px) {
	.to-bottomnav {
		display: none;
	}
}

.to-bottomnav__item {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 6px 4px;
	min-height: 48px;
	border: none;
	background: transparent;
	color: var(--to-text-3);
	font-size: var(--to-fs-xs);
	font-weight: 600;
	transition: color var(--to-dur-fast) var(--to-ease);
}

.to-bottomnav__item:hover,
.to-bottomnav__item[aria-current='page'] {
	color: var(--to-primary-strong);
}

.to-bottomnav__item .to-icon {
	width: 21px;
	height: 21px;
}

.to-bottomnav__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: var(--to-radius-pill);
	background: var(--to-accent);
	color: #fff;
	font-size: 11px;
	font-family: var(--to-num-font);
	font-weight: 700;
	position: absolute;
	top: 2px;
	inset-inline-end: calc(50% - 18px);
}

.to-bottomnav__count[data-count='0'],
.to-bottomnav__count:empty {
	display: none;
}
