/**
 * Explore864 PWA app shell — bottom nav, FAB, sheets, feed cards.
 *
 * @package Explore864
 */

/* -------------------------------------------------------------------------
   App shell layout
   ------------------------------------------------------------------------- */

.explore864-app {
	font-family: var(--explore864-font-body);
	padding-bottom: calc(var(--explore864-nav-height) + var(--explore864-safe-bottom));
}

.explore864-app h1,
.explore864-app h2,
.explore864-app h3 {
	font-family: var(--explore864-font-heading);
}

.explore864-app__header-bar {
	align-items: center;
	backdrop-filter: blur(12px);
	background: color-mix(in srgb, var(--explore864-color-elevated) 85%, transparent);
	border-bottom: 1px solid var(--explore864-color-border);
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	position: sticky;
	top: 0;
	z-index: 100;
}

.explore864-app__header-bar .explore864-app__logo {
	color: var(--explore864-color-primary);
	font-family: var(--explore864-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	text-decoration: none;
}

/* -------------------------------------------------------------------------
   Bottom navigation (mobile)
   ------------------------------------------------------------------------- */

.explore864-bottom-nav {
	align-items: center;
	backdrop-filter: blur(12px);
	background: color-mix(in srgb, var(--explore864-color-elevated) 92%, transparent);
	border-top: 1px solid var(--explore864-color-border);
	bottom: 0;
	display: flex;
	height: calc(var(--explore864-nav-height) + var(--explore864-safe-bottom));
	justify-content: space-around;
	left: 0;
	padding-bottom: var(--explore864-safe-bottom);
	position: fixed;
	right: 0;
	z-index: 200;
}

@media (min-width: 922px) {
	.explore864-bottom-nav {
		display: none;
	}

	.explore864-app {
		padding-bottom: 0;
	}
}

.explore864-bottom-nav__item {
	align-items: center;
	color: var(--explore864-color-muted);
	display: flex;
	flex: 1;
	flex-direction: column;
	font-size: 0.6875rem;
	font-weight: 600;
	gap: 0.25rem;
	justify-content: center;
	padding: 0.5rem;
	position: relative;
	text-decoration: none;
	transition: color 0.2s ease;
}

.explore864-bottom-nav__item.is-active,
.explore864-bottom-nav__item:hover {
	color: var(--explore864-color-primary);
}

.explore864-bottom-nav__icon {
	font-size: 1.25rem;
	line-height: 1;
}

.explore864-bottom-nav__badge {
	background: var(--explore864-color-secondary);
	border-radius: 999px;
	color: #fff;
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1;
	min-width: 1rem;
	padding: 0.15rem 0.35rem;
	position: absolute;
	right: calc(50% - 1.25rem);
	top: 0.25rem;
}

/* -------------------------------------------------------------------------
   FAB and create menu
   ------------------------------------------------------------------------- */

.explore864-fab {
	align-items: center;
	background: var(--explore864-color-secondary);
	border: none;
	border-radius: 50%;
	box-shadow: var(--explore864-shadow-lg);
	color: #fff;
	cursor: pointer;
	display: flex;
	font-size: 1.5rem;
	height: 56px;
	justify-content: center;
	margin-top: -1.5rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: 56px;
}

.explore864-fab:hover {
	box-shadow: 0 12px 32px rgba(201, 151, 0, 0.35);
	transform: scale(1.05);
}

.explore864-create-menu {
	background: var(--explore864-color-elevated);
	border: 1px solid var(--explore864-color-border);
	border-radius: var(--explore864-radius-lg) var(--explore864-radius-lg) 0 0;
	bottom: calc(var(--explore864-nav-height) + var(--explore864-safe-bottom));
	box-shadow: var(--explore864-shadow-lg);
	left: 0;
	padding: 1rem;
	position: fixed;
	right: 0;
	z-index: 190;
}

.explore864-create-menu__item {
	align-items: center;
	border-radius: var(--explore864-radius-md);
	color: var(--explore864-color-text);
	display: flex;
	font-weight: 600;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	text-decoration: none;
	transition: background 0.15s ease;
}

.explore864-create-menu__item:hover {
	background: var(--explore864-color-surface);
}

/* -------------------------------------------------------------------------
   Notification bell
   ------------------------------------------------------------------------- */

.explore864-notif-bell {
	background: none;
	border: none;
	color: var(--explore864-color-primary);
	cursor: pointer;
	font-size: 1.25rem;
	padding: 0.5rem;
	position: relative;
}

.explore864-notif-bell__badge {
	background: var(--explore864-color-secondary);
	border-radius: 999px;
	color: #fff;
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1;
	min-width: 1rem;
	padding: 0.15rem 0.35rem;
	position: absolute;
	right: 0;
	top: 0;
}

/* -------------------------------------------------------------------------
   Bottom sheet / modal
   ------------------------------------------------------------------------- */

.explore864-sheet-backdrop {
	background: rgba(0, 0, 0, 0.4);
	inset: 0;
	position: fixed;
	z-index: 300;
}

.explore864-sheet {
	background: var(--explore864-color-elevated);
	border-radius: var(--explore864-radius-lg) var(--explore864-radius-lg) 0 0;
	bottom: 0;
	left: 0;
	max-height: 90vh;
	overflow-y: auto;
	padding: 1.25rem;
	position: fixed;
	right: 0;
	z-index: 301;
}

.explore864-sheet__handle {
	background: var(--explore864-color-border);
	border-radius: 999px;
	height: 4px;
	margin: 0 auto 1rem;
	width: 40px;
}

/* -------------------------------------------------------------------------
   Feed cards
   ------------------------------------------------------------------------- */

.explore864-feed {
	margin: 0 auto;
	max-width: 640px;
	padding: 1rem;
}

.explore864-feed-tabs {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.explore864-feed-tabs button {
	background: var(--explore864-color-elevated);
	border: 1px solid var(--explore864-color-border);
	border-radius: 999px;
	color: var(--explore864-color-muted);
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.5rem 1rem;
	transition: all 0.2s ease;
}

.explore864-feed-tabs button.is-active {
	background: var(--explore864-color-primary);
	border-color: var(--explore864-color-primary);
	color: #fff;
}

.explore864-feed-card {
	background: var(--explore864-color-elevated);
	border: 1px solid var(--explore864-color-border);
	border-radius: var(--explore864-radius-md);
	box-shadow: var(--explore864-shadow-sm);
	margin-bottom: 1rem;
	overflow: hidden;
}

.explore864-feed-card__header {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	padding: 1rem 1rem 0;
}

.explore864-feed-card__avatar {
	background: color-mix(in srgb, var(--explore864-color-primary) 15%, #fff);
	border-radius: 50%;
	flex-shrink: 0;
	height: 40px;
	object-fit: cover;
	width: 40px;
}

.explore864-feed-card__meta {
	flex: 1;
	min-width: 0;
}

.explore864-feed-card__author {
	color: var(--explore864-color-text);
	font-size: 0.9375rem;
	font-weight: 700;
	margin: 0;
}

.explore864-feed-card__time {
	color: var(--explore864-color-muted);
	font-size: 0.8125rem;
}

.explore864-feed-card__pill {
	background: color-mix(in srgb, var(--explore864-color-accent) 12%, #fff);
	border-radius: 999px;
	color: var(--explore864-color-accent);
	display: inline-block;
	font-size: 0.6875rem;
	font-weight: 600;
	margin-top: 0.25rem;
	padding: 0.15rem 0.5rem;
}

.explore864-feed-card__body {
	color: var(--explore864-color-text);
	line-height: 1.5;
	padding: 0.75rem 1rem;
}

.explore864-feed-card__media img {
	aspect-ratio: 16 / 9;
	display: block;
	object-fit: cover;
	width: 100%;
}

.explore864-feed-card__actions {
	border-top: 1px solid var(--explore864-color-border);
	display: flex;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
}

.explore864-feed-card__action {
	background: none;
	border: none;
	color: var(--explore864-color-muted);
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 0.35rem 0.75rem;
}

.explore864-feed-card__action.is-liked {
	color: var(--explore864-color-secondary);
}

/* -------------------------------------------------------------------------
   Skeleton loaders
   ------------------------------------------------------------------------- */

.explore864-skeleton {
	animation: explore864-shimmer 1.5s infinite;
	background: linear-gradient(90deg, var(--explore864-color-border) 25%, color-mix(in srgb, var(--explore864-color-border) 50%, #fff) 50%, var(--explore864-color-border) 75%);
	background-size: 200% 100%;
	border-radius: var(--explore864-radius-sm);
}

@keyframes explore864-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.explore864-skeleton-card {
	height: 200px;
	margin-bottom: 1rem;
}

/* -------------------------------------------------------------------------
   Messages
   ------------------------------------------------------------------------- */

.explore864-messages {
	display: flex;
	flex-direction: column;
	height: calc(100vh - var(--explore864-nav-height) - 120px);
	max-width: 640px;
	margin: 0 auto;
}

.explore864-message-bubble {
	border-radius: var(--explore864-radius-md);
	max-width: 80%;
	padding: 0.65rem 1rem;
	word-wrap: break-word;
}

.explore864-message-bubble.is-sent {
	align-self: flex-end;
	background: var(--explore864-color-primary);
	color: #fff;
}

.explore864-message-bubble.is-received {
	align-self: flex-start;
	background: var(--explore864-color-surface);
	border: 1px solid var(--explore864-color-border);
}

.explore864-messages__thread {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.5rem;
	overflow-y: auto;
	padding: 1rem;
}

.explore864-messages__input {
	border-top: 1px solid var(--explore864-color-border);
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
}

.explore864-messages__input input {
	border: 1px solid var(--explore864-color-border);
	border-radius: 999px;
	flex: 1;
	padding: 0.65rem 1rem;
}

/* -------------------------------------------------------------------------
   QR display
   ------------------------------------------------------------------------- */

.explore864-qr-display {
	align-items: center;
	display: flex;
	flex-direction: column;
	padding: 2rem 1rem;
	text-align: center;
}

.explore864-qr-display img {
	border: 4px solid var(--explore864-color-primary);
	border-radius: var(--explore864-radius-md);
	max-width: 280px;
	width: 100%;
}

.explore864-qr-display__title {
	color: var(--explore864-color-primary);
	font-family: var(--explore864-font-heading);
	font-size: 1.5rem;
	margin: 1rem 0 0.5rem;
}
