/* Bernal PWA — app-shell styles
   Brand colors come from CSS vars set inline by the plugin (Settings > PWA),
   so this file never needs hardcoded hex values. */

/* ---------- Bottom Navigation ---------- */
.bernal-pwa-bottom-nav {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
	padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 782px) {
	.bernal-pwa-bottom-nav {
		display: flex;
	}
	/* keep page content from hiding behind the fixed nav */
	body {
		padding-bottom: calc(60px + env(safe-area-inset-bottom, 0));
	}
}

/* Matchmaker tab specifically only shows when the site is actually
   running as the installed app (standalone/fullscreen/minimal-ui
   display mode) — not on a regular mobile browser visit, per request.
   display-mode:browser is the default for a normal tab; every other
   nav item stays visible there as before. */
@media (display-mode: browser) {
	.bernal-pwa-nav-item--app-only {
		display: none;
	}
}

.bernal-pwa-nav-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 8px 0 6px;
	color: #777;
	text-decoration: none;
	font-size: 11px;
	transition: color 0.15s ease, transform 0.15s ease;
}

.bernal-pwa-nav-item:active {
	transform: scale(0.94);
}

.bernal-pwa-nav-item.is-active,
.bernal-pwa-nav-item:hover {
	color: var(--bernal-pwa-primary, #8a6d3b);
}

.bernal-pwa-nav-icon svg {
	display: block;
}

/* ---------- Install Banner ---------- */
.bernal-pwa-install-banner {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: 76px;
	z-index: 9998;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	transform: translateY(120%);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.bernal-pwa-install-banner.is-visible {
	transform: translateY(0);
	opacity: 1;
}

.bernal-pwa-install-banner__text {
	flex: 1;
	font-size: 13px;
	line-height: 1.4;
	color: #333;
}

.bernal-pwa-install-banner__actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.bernal-pwa-install-banner button,
.bernal-pwa-install-banner .bernal-pwa-install-btn {
	border: none;
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
}

.bernal-pwa-install-banner .bernal-pwa-install-btn {
	background: var(--bernal-pwa-primary, #8a6d3b);
	color: #fff;
	/* .bernal-pwa-install-btn is also used as an <a> tag (the "View in
	   App" link) — these reset anchor-specific defaults so it matches
	   the <button> version's look exactly, since the base rule above
	   (border/padding/font-size/cursor) already covers both. */
	text-decoration: none;
	display: inline-block;
	line-height: 1.4;
}

.bernal-pwa-install-banner .bernal-pwa-dismiss-btn {
	background: transparent;
	color: #999;
}

/* ---------- Update Toast ---------- */
.bernal-pwa-update-toast {
	position: fixed;
	top: 12px;
	left: 50%;
	transform: translate(-50%, -140%);
	z-index: 10000;
	background: #222;
	color: #fff;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: transform 0.3s ease;
}

.bernal-pwa-update-toast.is-visible {
	transform: translate(-50%, 0);
}

.bernal-pwa-update-toast button {
	background: var(--bernal-pwa-primary, #8a6d3b);
	border: none;
	color: #fff;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	cursor: pointer;
}

/* ---------- Skeleton Loading ---------- */
.bernal-pwa-skeleton {
	background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
	background-size: 400% 100%;
	animation: bernal-pwa-shimmer 1.4s ease infinite;
	border-radius: 12px;
}

@keyframes bernal-pwa-shimmer {
	0% { background-position: 100% 50%; }
	100% { background-position: 0 50%; }
}

/* ---------- Rounded cards / smooth transitions (used app-wide) ---------- */
.bernal-pwa-card {
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bernal-pwa-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

@media (prefers-reduced-motion: reduce) {
	.bernal-pwa-card,
	.bernal-pwa-nav-item,
	.bernal-pwa-install-banner,
	.bernal-pwa-update-toast {
		transition: none !important;
		animation: none !important;
	}
}
