/* =====================================================
   Listeo Health Communities – Modern Mobile-First UI
   Version 1.1.0
   ===================================================== */

:root {
	--lhc-primary: #0d9488;
	--lhc-primary-dark: #0f766e;
	--lhc-primary-light: #ccfbf1;
	--lhc-doctor: #059669;
	--lhc-expert: #2563eb;
	--lhc-text: #1e293b;
	--lhc-text-muted: #64748b;
	--lhc-border: #e2e8f0;
	--lhc-bg: #f8fafc;
	--lhc-card: #ffffff;
	--lhc-radius: 12px;
	--lhc-radius-sm: 8px;
	--lhc-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
	--lhc-shadow-md: 0 4px 12px rgba(0,0,0,.08);
	--lhc-transition: 0.2s ease;
}

.lhc-empty {
	text-align: center;
	color: var(--lhc-text-muted);
	padding: 40px 20px;
}

/* Buttons */
.lhc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 18px;
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all var(--lhc-transition);
	line-height: 1.3;
	white-space: nowrap;
}

.lhc-btn-primary,
.lhc-btn-join {
	background: var(--lhc-primary);
	color: #fff;
}

.lhc-btn-primary:hover,
.lhc-btn-join:hover {
	background: var(--lhc-primary-dark);
	color: #fff;
}

.lhc-btn-join.is-joined {
	background: #f1f5f9;
	color: var(--lhc-text);
	border: 1px solid var(--lhc-border);
}

.lhc-btn-join.is-joined:hover {
	background: #fee2e2;
	color: #b91c1c;
	border-color: #fecaca;
}

.lhc-btn-pending {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fcd34d;
	cursor: default;
}

.lhc-btn-outline {
	background: transparent;
	color: var(--lhc-primary);
	border: 1.5px solid var(--lhc-primary);
}

.lhc-btn-outline:hover {
	background: var(--lhc-primary-light);
}

/* Communities Grid – default 2 columns */
.lhc-communities-grid {
	display: grid;
	grid-template-columns: repeat(var(--lhc-cols, 2), 1fr);
	gap: 16px;
	margin: 24px 0;
}

.lhc-community-card {
	background: var(--lhc-card);
	border: 1px solid var(--lhc-border);
	border-radius: var(--lhc-radius);
	padding: 24px;
	box-shadow: var(--lhc-shadow);
	transition: box-shadow var(--lhc-transition), transform var(--lhc-transition);
	display: flex;
	flex-direction: column;
}

.lhc-community-card:hover {
	box-shadow: var(--lhc-shadow-md);
	transform: translateY(-3px);
}

.lhc-card-icon {
	font-size: 2rem;
	margin-bottom: 12px;
	line-height: 1;
}

.lhc-card-title {
	margin: 0 0 12px;
	font-size: 1.2rem;
	font-weight: 700;
}

.lhc-card-title a {
	color: var(--lhc-text);
	text-decoration: none;
}

.lhc-card-title a:hover {
	color: var(--lhc-primary);
}

.lhc-card-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 12px;
	font-size: 0.85rem;
	color: var(--lhc-text-muted);
}

.lhc-stat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.lhc-stat svg {
	flex-shrink: 0;
	opacity: 0.7;
}

.lhc-card-desc {
	font-size: 0.9rem;
	color: var(--lhc-text-muted);
	margin: 0 0 16px;
	line-height: 1.5;
	flex-grow: 1;
}

.lhc-card-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: auto;
}

/* Questions List */
.lhc-questions-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.lhc-question-item {
	display: flex;
	gap: 16px;
	background: var(--lhc-card);
	border: 1px solid var(--lhc-border);
	border-radius: var(--lhc-radius);
	padding: 20px;
	box-shadow: var(--lhc-shadow);
	transition: box-shadow var(--lhc-transition);
}

.lhc-question-item:hover {
	box-shadow: var(--lhc-shadow-md);
}

.lhc-q-left { flex-shrink: 0; }
.lhc-q-body { flex: 1; min-width: 0; }

.lhc-question-title {
	margin: 0 0 6px;
	font-size: 1.1rem;
	font-weight: 600;
}

.lhc-question-title a {
	color: var(--lhc-text);
	text-decoration: none;
}

.lhc-question-title a:hover {
	color: var(--lhc-primary);
}

.lhc-question-meta {
	font-size: 0.85rem;
	color: var(--lhc-text-muted);
	margin-bottom: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
}

.lhc-dot { opacity: 0.5; }

.lhc-excerpt {
	font-size: 0.95rem;
	color: #475569;
	line-height: 1.55;
}

/* Avatars */
.lhc-avatar,
.lhc-avatar-sm,
.lhc-avatar-xs {
	border-radius: 50%;
	object-fit: cover;
}

.lhc-avatar { width: 48px; height: 48px; }
.lhc-avatar-sm { width: 40px; height: 40px; }
.lhc-avatar-xs { width: 28px; height: 28px; }

/* User Card */
.lhc-user-card {
	background: var(--lhc-bg);
	border-radius: var(--lhc-radius-sm);
	padding: 16px;
	margin-bottom: 20px;
}

.lhc-user-card-header {
	display: flex;
	align-items: center;
	gap: 14px;
}

.lhc-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.lhc-verified-badge {
	position: absolute;
	bottom: -2px;
	right: -2px;
	width: 20px;
	height: 20px;
	background: var(--lhc-doctor);
	color: #fff;
	border-radius: 50%;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
}

.lhc-user-name {
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--lhc-text);
}

.lhc-role-badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 2px 8px;
	border-radius: 999px;
	margin-top: 4px;
}

.lhc-role-doctor {
	background: #d1fae5;
	color: var(--lhc-doctor);
}

.lhc-role-member {
	background: #f1f5f9;
	color: var(--lhc-text-muted);
}

.lhc-user-bio {
	margin-top: 12px;
	font-size: 0.9rem;
	color: var(--lhc-text-muted);
	line-height: 1.5;
}

.lhc-user-listings {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.lhc-listings-label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--lhc-text-muted);
}

.lhc-listing-link {
	font-size: 0.85rem;
	color: var(--lhc-primary);
	text-decoration: none;
	background: var(--lhc-primary-light);
	padding: 4px 10px;
	border-radius: 999px;
	font-weight: 500;
}

.lhc-listing-link:hover {
	background: var(--lhc-primary);
	color: #fff;
}

/* Author Compact */
.lhc-author-compact {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.lhc-author-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.lhc-author-name {
	font-weight: 600;
	font-size: 0.95rem;
}

/* Badges */
.lhc-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.lhc-badge-user { background: #f1f5f9; color: #64748b; }
.lhc-badge-expert { background: #dbeafe; color: var(--lhc-expert); }
.lhc-badge-doctor { background: #d1fae5; color: var(--lhc-doctor); }

/* Single Question */
.lhc-question-card {
	background: var(--lhc-card);
	border: 1px solid var(--lhc-border);
	border-radius: var(--lhc-radius);
	padding: 28px;
	margin-bottom: 28px;
	box-shadow: var(--lhc-shadow);
}

.lhc-question-card .lhc-question-title {
	font-size: 1.5rem;
	margin: 16px 0 8px;
}

.lhc-meta-row {
	font-size: 0.85rem;
	color: var(--lhc-text-muted);
	margin-bottom: 16px;
}

.lhc-content {
	font-size: 1.05rem;
	line-height: 1.7;
	color: #334155;
}

/* Answers */
.lhc-answers-section h2 {
	font-size: 1.25rem;
	margin-bottom: 16px;
}

.lhc-answer-card {
	background: var(--lhc-card);
	border: 1px solid var(--lhc-border);
	border-radius: var(--lhc-radius);
	padding: 20px;
	margin-bottom: 14px;
	box-shadow: var(--lhc-shadow);
}

.lhc-answer-doctor { border-left: 4px solid var(--lhc-doctor); }
.lhc-answer-expert { border-left: 4px solid var(--lhc-expert); }

.lhc-answer-content {
	font-size: 0.98rem;
	line-height: 1.65;
	color: #334155;
}

.lhc-answer-footer {
	margin-top: 12px;
	font-size: 0.8rem;
	color: var(--lhc-text-muted);
}

/* Social Embeds */
.lhc-social-section { margin-bottom: 32px; }
.lhc-social-section h2 { font-size: 1.2rem; margin-bottom: 16px; }

.lhc-social-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.lhc-embed {
	border-radius: var(--lhc-radius-sm);
	overflow: hidden;
	background: #000;
}

.lhc-embed-youtube iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	display: block;
	border: none;
}

.lhc-embed-facebook,
.lhc-embed-instagram {
	background: var(--lhc-card);
	padding: 12px;
	border: 1px solid var(--lhc-border);
}

.lhc-embed-link a {
	display: block;
	padding: 16px;
	color: var(--lhc-primary);
	word-break: break-all;
}

.lhc-social-item {
	background: var(--lhc-card);
	border-radius: var(--lhc-radius);
	overflow: hidden;
	border: 1px solid var(--lhc-border);
	box-shadow: var(--lhc-shadow);
}

.lhc-social-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	font-size: 0.85rem;
	color: var(--lhc-text-muted);
}

/* Forms */
.lhc-form-card {
	background: var(--lhc-card);
	border: 1px solid var(--lhc-border);
	border-radius: var(--lhc-radius);
	padding: 24px;
	box-shadow: var(--lhc-shadow);
	max-width: 640px;
}

.lhc-form-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.lhc-form-subtitle {
	display: block;
	font-size: 0.85rem;
	color: var(--lhc-text-muted);
}

.lhc-field { margin-bottom: 14px; }

.lhc-field input[type="text"],
.lhc-field input[type="url"],
.lhc-field select,
.lhc-field textarea,
.lhc-link-input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--lhc-border);
	border-radius: var(--lhc-radius-sm);
	font-size: 1rem;
	color: var(--lhc-text);
	background: #fff;
	transition: border-color var(--lhc-transition);
	box-sizing: border-box;
}

.lhc-field input:focus,
.lhc-field select:focus,
.lhc-field textarea:focus,
.lhc-link-input:focus {
	outline: none;
	border-color: var(--lhc-primary);
	box-shadow: 0 0 0 3px var(--lhc-primary-light);
}

.lhc-form-actions { margin-top: 8px; }

.lhc-submit-link-section {
	margin-top: 32px;
	padding: 24px;
	background: var(--lhc-bg);
	border-radius: var(--lhc-radius);
}

.lhc-submit-link-section h3 {
	margin: 0 0 6px;
	font-size: 1.1rem;
}

.lhc-hint {
	font-size: 0.85rem;
	color: var(--lhc-text-muted);
	margin: 6px 0 0;
}

.lhc-link-box {
	background: var(--lhc-bg);
	border: 1px dashed var(--lhc-border);
	border-radius: var(--lhc-radius-sm);
	padding: 14px;
	margin-bottom: 14px;
}

.lhc-link-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 8px;
	color: var(--lhc-text);
}

.lhc-hub-header {
	margin-bottom: 28px;
}

.lhc-hub-header h1 {
	margin: 0 0 8px;
	font-size: 1.75rem;
}

.lhc-hub-stats {
	display: flex;
	gap: 8px;
	font-size: 0.9rem;
	color: var(--lhc-text-muted);
	margin-top: 8px;
}

.lhc-section-title {
	font-size: 1.2rem;
	margin: 32px 0 16px;
}

.lhc-link-input-wrap {
	display: flex;
	gap: 10px;
}

.lhc-link-input { flex: 1; }

.lhc-link-message {
	margin-top: 10px;
	font-size: 0.9rem;
	padding: 10px 14px;
	border-radius: var(--lhc-radius-sm);
}

.lhc-link-message.success {
	background: #d1fae5;
	color: #065f46;
}

.lhc-link-message.error {
	background: #fee2e2;
	color: #991b1b;
}

.lhc-alert {
	padding: 14px 18px;
	border-radius: var(--lhc-radius-sm);
	margin-bottom: 16px;
	font-size: 0.95rem;
}

.lhc-alert-success { background: #d1fae5; color: #065f46; }
.lhc-alert-error { background: #fee2e2; color: #991b1b; }

.lhc-login-prompt {
	text-align: center;
	padding: 40px 20px;
	background: var(--lhc-bg);
	border-radius: var(--lhc-radius);
}

/* Responsive */
@media (max-width: 900px) {
	.lhc-communities-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.lhc-communities-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.lhc-question-item {
		flex-direction: column;
		gap: 12px;
	}

	.lhc-question-card { padding: 20px; }
	.lhc-question-card .lhc-question-title { font-size: 1.25rem; }

	.lhc-link-input-wrap { flex-direction: column; }

	.lhc-card-actions { flex-direction: column; }
	.lhc-card-actions .lhc-btn { width: 100%; }

	.lhc-social-grid { grid-template-columns: 1fr; }

	.lhc-user-card-header {
		flex-direction: column;
		text-align: center;
	}

	.lhc-form-card { padding: 18px; }
}

/* ===== v1.3 – Post cards, answer boxes, 2-col mobile ===== */
.lhc-post-card {
	padding: 16px;
}

.lhc-post-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.lhc-post-meta {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.lhc-post-meta strong {
	font-size: 0.95rem;
}

.lhc-time {
	font-size: 0.8rem;
	color: var(--lhc-text-muted);
}

.lhc-inline-links {
	margin: 12px 0;
	border-radius: var(--lhc-radius-sm);
	overflow: hidden;
}

.lhc-inline-links .lhc-embed {
	max-width: 100%;
}

.lhc-answers-preview {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--lhc-border);
}

.lhc-answer-mini {
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
}

.lhc-answer-mini:last-child {
	border-bottom: none;
}

.lhc-answer-text {
	font-size: 0.9rem;
	color: #334155;
	margin: 6px 0 0 50px;
	line-height: 1.5;
}

/* Answer box under each question */
.lhc-answer-box {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--lhc-border);
}

.lhc-answer-box-login {
	text-align: center;
	font-size: 0.9rem;
}

.lhc-answer-box-login a {
	color: var(--lhc-primary);
	font-weight: 600;
}

.lhc-answer-input-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.lhc-answer-input-row textarea {
	flex: 1;
	padding: 10px 12px;
	border: 1.5px solid var(--lhc-border);
	border-radius: 20px;
	font-size: 0.95rem;
	resize: none;
	min-height: 40px;
}

.lhc-answer-input-row textarea:focus {
	outline: none;
	border-color: var(--lhc-primary);
	box-shadow: 0 0 0 3px var(--lhc-primary-light);
}

.lhc-answer-link-row {
	display: flex;
	gap: 8px;
	margin-top: 8px;
	padding-left: 42px;
}

.lhc-answer-link-row input[type="url"] {
	flex: 1;
	padding: 8px 12px;
	border: 1px dashed var(--lhc-border);
	border-radius: var(--lhc-radius-sm);
	font-size: 0.85rem;
}

.lhc-btn-sm {
	padding: 8px 16px;
	font-size: 0.85rem;
}

/* Tighter community cards for 2-col */
.lhc-community-card {
	padding: 16px;
}

.lhc-card-icon {
	font-size: 1.5rem;
	margin-bottom: 8px;
}

.lhc-card-title {
	font-size: 1.05rem;
	margin-bottom: 8px;
}

.lhc-card-stats {
	font-size: 0.8rem;
	gap: 10px;
	margin-bottom: 10px;
}

.lhc-card-actions {
	gap: 8px;
}

.lhc-card-actions .lhc-btn {
	padding: 8px 14px;
	font-size: 0.85rem;
	flex: 1;
	text-align: center;
}

@media (max-width: 640px) {
	.lhc-community-card {
		padding: 12px;
	}
	.lhc-card-title {
		font-size: 0.95rem;
	}
	.lhc-answer-link-row {
		flex-direction: column;
		padding-left: 0;
	}
	.lhc-answer-input-row {
		flex-direction: column;
	}
}

/* ===== v1.4 – Search, Joined, Top Communities ===== */
.lhc-communities-wrap {
	margin: 16px 0 32px;
}

.lhc-search-box {
	position: relative;
	margin-bottom: 24px;
}

.lhc-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--lhc-text-muted);
	pointer-events: none;
}

.lhc-search-input {
	width: 100%;
	padding: 14px 16px 14px 44px;
	border: 1.5px solid var(--lhc-border);
	border-radius: 999px;
	font-size: 1rem;
	background: var(--lhc-card);
	color: var(--lhc-text);
	box-sizing: border-box;
	transition: border-color var(--lhc-transition), box-shadow var(--lhc-transition);
}

.lhc-search-input:focus {
	outline: none;
	border-color: var(--lhc-primary);
	box-shadow: 0 0 0 3px var(--lhc-primary-light);
}

.lhc-search-input::placeholder {
	color: #94a3b8;
}

.lhc-section {
	margin-bottom: 32px;
}

.lhc-section-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 16px;
	color: var(--lhc-text);
}

.lhc-section-icon {
	font-size: 1.2rem;
}

.lhc-section-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	background: var(--lhc-primary-light);
	color: var(--lhc-primary-dark);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
}

.lhc-joined-section .lhc-community-card {
	border-color: #99f6e4;
	background: linear-gradient(180deg, #f0fdfa 0%, #fff 40%);
}

.lhc-top-rank-wrap {
	position: relative;
}

.lhc-rank-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	font-size: 0.7rem;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #64748b;
}

.lhc-rank-1 {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #fff;
}

.lhc-rank-2 {
	background: linear-gradient(135deg, #94a3b8, #64748b);
	color: #fff;
}

.lhc-rank-3 {
	background: linear-gradient(135deg, #d97706, #b45309);
	color: #fff;
}

.lhc-no-search-results {
	text-align: center;
	color: var(--lhc-text-muted);
	padding: 24px;
	font-size: 0.95rem;
}

@media (max-width: 640px) {
	.lhc-search-input {
		padding: 12px 14px 12px 40px;
		font-size: 0.95rem;
	}
	.lhc-section-heading {
		font-size: 1.05rem;
	}
}

/* ===== v1.5 – Search fix, Exit, embeds, photos ===== */
.lhc-communities-wrap {
	max-width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
	padding: 0 4px;
}

.lhc-search-box {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-bottom: 20px;
}

.lhc-search-input {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

.lhc-btn-joined-badge {
	background: #ecfdf5;
	color: #059669;
	border: 1px solid #a7f3d0;
	cursor: default;
	pointer-events: none;
}

.lhc-btn-exit {
	background: #fff;
	color: #b91c1c;
	border: 1.5px solid #fecaca;
	padding: 8px 16px;
	font-size: 0.85rem;
}

.lhc-btn-exit:hover {
	background: #fef2f2;
	color: #991b1b;
}

.lhc-hub-title-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
}

/* Embed cards (FB / IG) */
.lhc-embed-card {
	background: var(--lhc-card);
	border: 1px solid var(--lhc-border);
	border-radius: var(--lhc-radius-sm);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.lhc-embed-card-body {
	padding: 14px 16px;
}

.lhc-embed-brand {
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--lhc-text);
}

.lhc-embed-card-url {
	margin: 6px 0 0;
	font-size: 0.8rem;
	color: var(--lhc-text-muted);
	word-break: break-all;
}

.lhc-open-btn {
	display: block;
	text-align: center;
	padding: 10px;
	background: var(--lhc-primary);
	color: #fff !important;
	font-weight: 600;
	font-size: 0.85rem;
	text-decoration: none !important;
	border-top: 1px solid var(--lhc-border);
}

.lhc-open-btn:hover {
	background: var(--lhc-primary-dark);
}

.lhc-embed-youtube {
	position: relative;
}

.lhc-embed-youtube .lhc-open-btn {
	border-radius: 0 0 var(--lhc-radius-sm) var(--lhc-radius-sm);
}

/* Photos */
.lhc-post-photo {
	margin: 12px 0;
	border-radius: var(--lhc-radius-sm);
	overflow: hidden;
}

.lhc-post-photo img,
.lhc-photo {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: var(--lhc-radius-sm);
}

.lhc-photo-box {
	margin-bottom: 12px;
}

.lhc-photo-input {
	width: 100%;
	font-size: 0.9rem;
}

.lhc-photo-input-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.lhc-photo-label {
	position: relative;
	cursor: pointer;
	margin: 0;
}

@media (max-width: 640px) {
	.lhc-hub-title-row {
		flex-direction: column;
	}
	.lhc-btn-exit {
		width: 100%;
	}
}

/* ===== v1.6 Instagram-style feed ===== */
.lhc-ig-feed {
	max-width: 540px;
	margin: 0 auto;
	padding: 0 0 40px;
}

.lhc-ig-header {
	padding: 12px 4px 16px;
	border-bottom: 1px solid var(--lhc-border);
	margin-bottom: 8px;
}

.lhc-ig-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.lhc-ig-community-icon {
	font-size: 2rem;
	line-height: 1;
}

.lhc-ig-header h1 {
	font-size: 1.2rem;
	margin: 0;
}

.lhc-ig-header-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.lhc-btn-post-toggle {
	background: var(--lhc-primary);
	color: #fff;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.9rem;
	gap: 4px;
}

.lhc-btn-post-toggle:hover {
	background: var(--lhc-primary-dark);
	color: #fff;
}

.lhc-post-icon {
	font-size: 1.15rem;
	font-weight: 700;
}

.lhc-post-form-panel {
	padding: 12px 0 8px;
	border-bottom: 1px solid var(--lhc-border);
	margin-bottom: 8px;
}

.lhc-post-form-panel[hidden] {
	display: none !important;
}

/* Feed posts */
.lhc-ig-posts {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.lhc-ig-post {
	background: var(--lhc-card);
	border-bottom: 1px solid var(--lhc-border);
	padding: 12px 0 16px;
}

.lhc-ig-post-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px 10px;
}

.lhc-ig-post-user {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.lhc-ig-post-user strong {
	font-size: 0.9rem;
}

.lhc-ig-media {
	width: 100%;
	background: #000;
	margin-bottom: 8px;
}

.lhc-ig-media img.lhc-photo {
	width: 100%;
	height: auto;
	max-height: 600px;
	object-fit: contain;
	display: block;
	border-radius: 0;
}

.lhc-ig-media .lhc-embed-youtube {
	width: 100%;
	border-radius: 0;
}

.lhc-ig-media .lhc-embed-youtube iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	display: block;
	border: none;
}

.lhc-ig-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 6px 12px;
}

.lhc-like-btn {
	background: none;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 1.25rem;
	padding: 4px 0;
	color: var(--lhc-text);
	line-height: 1;
}

.lhc-like-btn.is-liked {
	color: #e11d48;
}

.lhc-like-btn .lhc-like-count {
	font-size: 0.85rem;
	font-weight: 600;
}

.lhc-comment-count {
	font-size: 0.9rem;
	color: var(--lhc-text-muted);
	text-decoration: none;
}

.lhc-ig-caption {
	padding: 0 12px 6px;
	font-size: 0.9rem;
	line-height: 1.45;
}

.lhc-ig-caption strong {
	margin-right: 6px;
}

.lhc-ig-title {
	font-weight: 600;
}

.lhc-ig-text {
	margin: 4px 0 0;
	color: #334155;
}

.lhc-ig-comments {
	padding: 4px 12px 0;
}

.lhc-ig-comment {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}

.lhc-ig-comment-body {
	flex: 1;
	font-size: 0.875rem;
	line-height: 1.4;
}

.lhc-ig-comment-body strong {
	margin-right: 6px;
}

.lhc-ig-comment-actions {
	margin-top: 4px;
}

.lhc-ig-comment-actions .lhc-like-btn {
	font-size: 0.95rem;
}

.lhc-ig-post .lhc-answer-box {
	padding: 8px 12px 0;
	border-top: none;
	margin-top: 4px;
}

/* Desktop: centered narrow feed like Instagram */
@media (min-width: 768px) {
	.lhc-ig-feed {
		max-width: 470px;
	}
	.lhc-community-hub.lhc-ig-feed {
		border: 1px solid var(--lhc-border);
		border-radius: 12px;
		background: #fff;
		padding: 0;
		margin-top: 20px;
	}
	.lhc-ig-header {
		padding: 16px;
	}
	.lhc-ig-post {
		padding: 14px 0 18px;
	}
}

@media (max-width: 640px) {
	.lhc-post-label {
		display: none;
	}
	.lhc-btn-post-toggle {
		padding: 8px 12px;
	}
}

/* ===== v1.7 cards, engage dropdown, success, upload bar ===== */
.lhc-community-name {
	font-size: 1.65rem !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em;
	margin: 0 0 2px !important;
}

.lhc-btn-create-post {
	background: var(--lhc-primary);
	color: #fff !important;
	padding: 12px 20px !important;
	border-radius: 999px;
	font-size: 1rem !important;
	font-weight: 700;
	box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.lhc-btn-create-post:hover {
	background: var(--lhc-primary-dark);
	color: #fff !important;
	transform: translateY(-1px);
}

.lhc-post-icon {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1;
}

/* Separate question cards */
.lhc-ig-posts {
	gap: 16px !important;
	padding: 12px 8px 24px;
}

.lhc-q-card {
	border: 1px solid var(--lhc-border) !important;
	border-radius: 16px !important;
	border-bottom: 1px solid var(--lhc-border) !important;
	padding: 14px 0 12px !important;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
	background: #fff;
	overflow: hidden;
}

.lhc-q-card .lhc-ig-post-header,
.lhc-q-card .lhc-ig-actions,
.lhc-q-card .lhc-ig-caption {
	padding-left: 14px;
	padding-right: 14px;
}

.lhc-answers-panel {
	padding: 8px 14px 4px;
	border-top: 1px solid var(--lhc-border);
	margin-top: 8px;
}

.lhc-answers-panel[hidden] {
	display: none !important;
}

.lhc-toggle-answers {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--lhc-text-muted);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 0;
}

.lhc-toggle-answers:hover,
.lhc-toggle-answers.is-open {
	color: var(--lhc-primary);
}

.lhc-no-answers {
	font-size: 0.85rem;
	color: var(--lhc-text-muted);
	padding: 8px 0;
}

/* Most Engaging dropdown */
.lhc-engage-dropdown-wrap {
	padding: 10px 12px 14px;
}

.lhc-engage-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--lhc-text-muted);
	margin-bottom: 6px;
}

.lhc-engage-select {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--lhc-border);
	border-radius: 12px;
	font-size: 0.95rem;
	background: #fff;
	color: var(--lhc-text);
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}

.lhc-engage-select:focus {
	outline: none;
	border-color: var(--lhc-primary);
	box-shadow: 0 0 0 3px var(--lhc-primary-light);
}

/* YouTube blur button */
.lhc-open-btn-blur {
	background: rgba(255, 255, 255, 0.18) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: #fff !important;
	border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
	font-weight: 600;
	text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.lhc-open-btn-blur:hover {
	background: rgba(255, 255, 255, 0.28) !important;
}

.lhc-embed-youtube {
	position: relative;
}

/* Full-page success overlay */
.lhc-success-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	animation: lhcFadeIn 0.25s ease;
}

@keyframes lhcFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.lhc-success-card {
	background: #fff;
	border-radius: 20px;
	padding: 36px 28px;
	text-align: center;
	max-width: 340px;
	width: 100%;
	box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.lhc-success-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	font-size: 2rem;
	font-weight: 700;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lhc-success-card h2 {
	margin: 0 0 8px;
	font-size: 1.35rem;
}

.lhc-success-card p {
	margin: 0 0 20px;
	color: var(--lhc-text-muted);
}

.lhc-success-card .lhc-btn {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	text-align: center;
}

.lhc-btn-lg {
	padding: 14px 20px !important;
	font-size: 1rem !important;
}

/* Upload progress bar */
.lhc-upload-progress {
	display: none;
	margin: 10px 0;
	height: 8px;
	background: #e2e8f0;
	border-radius: 999px;
	overflow: hidden;
}

.lhc-upload-progress.is-active {
	display: block;
}

.lhc-upload-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--lhc-primary), #2dd4bf);
	border-radius: 999px;
	transition: width 0.15s linear;
}

.lhc-upload-pct {
	font-size: 0.75rem;
	color: var(--lhc-text-muted);
	margin-top: 4px;
	text-align: right;
}

@media (min-width: 768px) {
	.lhc-community-name {
		font-size: 1.85rem !important;
	}
	.lhc-btn-create-post {
		padding: 14px 24px !important;
		font-size: 1.05rem !important;
	}
}

/* ===== v1.8 – header right post, dropdown text, IG icons, profile links ===== */
.lhc-hub-title-row {
	display: flex !important;
	flex-direction: row !important;
	justify-content: space-between !important;
	align-items: center !important;
	gap: 12px;
	flex-wrap: nowrap !important;
}

.lhc-ig-header-info {
	flex: 1;
	min-width: 0;
}

.lhc-ig-header-actions {
	flex-shrink: 0;
	margin-left: auto;
}

.lhc-btn-create-post .lhc-post-label {
	display: none; /* icon only on mobile for space */
}

.lhc-btn-create-post {
	width: 48px;
	height: 48px;
	padding: 0 !important;
	border-radius: 50% !important;
	justify-content: center;
}

@media (min-width: 480px) {
	.lhc-btn-create-post {
		width: auto;
		height: auto;
		padding: 12px 20px !important;
		border-radius: 999px !important;
	}
	.lhc-btn-create-post .lhc-post-label {
		display: inline;
	}
}

/* Dropdown text visibility */
.lhc-engage-select {
	color: #0f172a !important;
	background-color: #fff !important;
	font-size: 1rem !important;
	font-weight: 500;
	min-height: 48px;
}

.lhc-engage-select option {
	color: #0f172a;
	background: #fff;
}

.lhc-engage-select:invalid,
.lhc-engage-select option[value=""] {
	color: #64748b;
}

/* Instagram-style action icons */
.lhc-ig-actions {
	gap: 16px !important;
	padding-top: 10px !important;
	padding-bottom: 4px !important;
}

.lhc-like-btn {
	font-size: 1.5rem !important;
	padding: 2px 4px !important;
}

.lhc-like-btn .lhc-icon-heart {
	display: block;
	width: 28px;
	height: 28px;
}

.lhc-like-btn.is-liked .lhc-icon-heart {
	animation: lhcHeartPop 0.25s ease;
}

@keyframes lhcHeartPop {
	0% { transform: scale(1); }
	40% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

.lhc-like-count {
	font-size: 0.9rem !important;
	font-weight: 600;
	margin-left: 2px;
}

.lhc-toggle-answers {
	font-size: 1rem !important;
	gap: 6px !important;
}

.lhc-icon-comment {
	display: block;
	width: 26px;
	height: 26px;
}

.lhc-ans-count {
	font-weight: 600;
	font-size: 0.9rem;
}

/* Author profile links */
.lhc-author-link {
	display: block;
	flex-shrink: 0;
}

.lhc-author-name {
	color: inherit !important;
	text-decoration: none !important;
}

.lhc-author-name:hover strong {
	text-decoration: underline;
}

.lhc-avatar-sm {
	width: 40px !important;
	height: 40px !important;
	border-radius: 50%;
	object-fit: cover;
}

/* ===== v1.9 – professional polish, larger buttons, upload bar ===== */
.lhc-btn {
	min-height: 44px;
	padding: 12px 20px;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: 12px;
	transition: all 0.2s ease;
}

.lhc-btn-lg {
	min-height: 52px;
	padding: 14px 24px !important;
	font-size: 1.05rem !important;
	border-radius: 14px !important;
	width: 100%;
}

.lhc-btn-photo,
.lhc-btn-answer {
	min-height: 44px !important;
	padding: 10px 18px !important;
	font-size: 0.95rem !important;
	border-radius: 12px !important;
}

.lhc-btn-primary.is-loading {
	opacity: 0.75;
	pointer-events: none;
	position: relative;
}

.lhc-answer-link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 10px;
}

.lhc-answer-link-row input[type="url"] {
	flex: 1 1 140px;
	min-height: 44px;
	padding: 10px 14px;
	border-radius: 12px;
	border: 1.5px solid var(--lhc-border);
	font-size: 0.95rem;
}

.lhc-answer-input-row textarea {
	min-height: 56px;
	padding: 12px 14px;
	border-radius: 14px;
	font-size: 0.95rem;
}

/* Upload progress – always clear */
.lhc-upload-progress {
	display: none;
	margin: 12px 0 4px;
	height: 10px;
	background: #e2e8f0;
	border-radius: 999px;
	overflow: hidden;
}

.lhc-upload-progress.is-active {
	display: block;
}

.lhc-upload-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #0d9488, #2dd4bf);
	border-radius: 999px;
	transition: width 0.12s linear;
	box-shadow: 0 0 8px rgba(13, 148, 136, 0.4);
}

.lhc-upload-pct {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--lhc-primary-dark, #0f766e);
	min-height: 1.2em;
	text-align: right;
}

.lhc-photo-name {
	display: block;
	font-size: 0.8rem;
	color: var(--lhc-text-muted);
	margin-top: 6px;
	word-break: break-all;
}

/* Card polish */
.lhc-q-card {
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07) !important;
	border: 1px solid #e2e8f0 !important;
}

.lhc-ig-header {
	padding-bottom: 16px !important;
}

.lhc-engage-select {
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.lhc-btn-create-post {
	box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35) !important;
}

/* Loading spinner feel on submit */
.lhc-btn.is-loading::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: lhcSpin 0.6s linear infinite;
	vertical-align: middle;
}

@keyframes lhcSpin {
	to { transform: rotate(360deg); }
}

/* App open cards */
.lhc-embed-hint {
	margin: 6px 0 0;
	font-size: 0.75rem;
	color: #64748b;
}

.lhc-embed-facebook .lhc-open-btn,
.lhc-embed-instagram .lhc-open-btn {
	background: linear-gradient(135deg, #0d9488, #0f766e);
	color: #fff !important;
	font-weight: 700;
}

.lhc-embed-instagram .lhc-open-btn {
	background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}
