/* Fixed floating install card — stays until Install / ×. No CSS color-mix (mobile). */
.twc-pwa-install {
	--twc-pwa-theme: #0f6e56;
	--twc-pwa-bg: #0f6e56;
	--twc-pwa-cta-bg: #e8f3ef;
	--twc-pwa-cta-border: #c5ddd4;
	position: fixed;
	z-index: 100000;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	width: calc(100% - 1.5rem);
	max-width: 26rem;
	box-sizing: border-box;
	border: 1px solid var(--twc-pwa-cta-border);
	border-radius: 12px;
	background: var(--twc-pwa-cta-bg);
	overflow: hidden;
	box-shadow:
		0 4px 6px rgba(0, 0, 0, 0.08),
		0 12px 28px rgba(0, 0, 0, 0.16);
}

.twc-pwa-install[hidden] {
	display: none !important;
}

.twc-pwa-install--top {
	top: max(0.75rem, env(safe-area-inset-top, 0px));
	bottom: auto;
}

.twc-pwa-install--bottom {
	bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
	top: auto;
}

.twc-pwa-install__accent {
	height: 0.35rem;
	background: var(--twc-pwa-theme);
	flex: 0 0 auto;
}

.twc-pwa-install__body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.75rem;
	padding: 0.85rem 2.5rem 0.85rem 1rem;
	background: var(--twc-pwa-bg);
	box-sizing: border-box;
}

.twc-pwa-install__brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.twc-pwa-install__icon {
	flex: 0 0 auto;
	width: 3rem;
	height: 3rem;
	border-radius: 0.65rem;
	object-fit: cover;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.twc-pwa-install__text {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.twc-pwa-install__name {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25;
	color: #1d2327;
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.88);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
	box-sizing: border-box;
}

.twc-pwa-install__short {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.3;
	color: #1d2327;
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.72);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
	box-sizing: border-box;
}

.twc-pwa-install__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.5rem;
	min-width: 0;
}

.twc-pwa-install__hint {
	margin: 0;
	color: #1d2327;
	font-size: 0.875rem;
	line-height: 1.4;
	padding: 0.35rem 0.5rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.88);
	box-sizing: border-box;
}

.twc-pwa-install__button {
	width: 100%;
	cursor: pointer;
	padding: 0.65rem 1rem;
	border: 1px solid var(--twc-pwa-theme);
	border-radius: 4px;
	background: var(--twc-pwa-theme);
	color: #fff;
	font-size: 0.9rem;
	line-height: 1.3;
	text-align: center;
	box-sizing: border-box;
}

.twc-pwa-install__button:hover,
.twc-pwa-install__button:focus {
	filter: brightness(0.92);
}

.twc-pwa-install__dismiss {
	position: absolute;
	top: 0.45rem;
	right: 0.35rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin: 0;
	padding: 0;
	cursor: pointer;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #1d2327;
	font-size: 1.35rem;
	font-weight: 400;
	line-height: 1;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.twc-pwa-install__dismiss:hover,
.twc-pwa-install__dismiss:focus {
	background: #fff;
}

@media (min-width: 641px) {
	.twc-pwa-install {
		width: calc(100% - 2rem);
		max-width: 24rem;
		left: auto;
		right: 1.25rem;
		transform: none;
	}

	.twc-pwa-install--top {
		top: 1.25rem;
		bottom: auto;
	}

	.twc-pwa-install--bottom {
		bottom: 1.25rem;
		top: auto;
	}
}
