/**
 * BC Club - Estilos Base y UI
 * Desarrollado por Drunel Labs
 */

:root {
	/* Colores base del manual */
	--bc-bg-dark: #131218;
	--bc-accent: #DCA54A;
	--bc-accent-soft: #DFB77A;

	--bc-surface-light: #F7F4EF;
	--bc-surface-white: #FFFFFF;
	--bc-surface-dark: #1B1A22;

	--bc-text-main: #17151C;
	--bc-text-soft: #6F6B76;
	--bc-text-invert: #F7F4EF;

	--bc-border-light: #E7DECf;
	--bc-border-dark: rgba(220, 165, 74, 0.22);

	/* Tipografía del sistema para máximo rendimiento */
	--bc-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--bc-font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset dentro del contenedor de la comunidad */
.bc-community-app {
	font-family: var(--bc-font-body);
	background-color: var(--bc-surface-light);
	color: var(--bc-text-main);
	min-height: 100vh;
	box-sizing: border-box;
	position: relative;
	padding-bottom: 80px; /* Espacio para FAB */
}

.bc-community-app * {
	box-sizing: border-box;
}

/* 1. Header Fijo */
.bc-community-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--bc-surface-white);
	border-bottom: 1px solid var(--bc-border-light);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 24px;
	height: 64px;
}

.bc-header-title {
	font-family: var(--bc-font-heading);
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	letter-spacing: -0.02em;
	color: var(--bc-text-main);
}

.bc-header-profile {
	cursor: pointer;
	min-width: 48px;
	min-height: 48px;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* 2. Barra de Canales (Scroll Horizontal) */
.bc-community-nav {
	background-color: var(--bc-surface-white);
	border-bottom: 1px solid var(--bc-border-light);
	padding: 12px 24px;
	display: flex;
	gap: 12px;
	overflow-x: auto;
	white-space: nowrap;
	-ms-overflow-style: none; /* IE y Edge */
	scrollbar-width: none; /* Firefox */
}
.bc-community-nav::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
}

.bc-channel-btn {
	background-color: var(--bc-surface-light);
	color: var(--bc-text-main);
	border: 1px solid var(--bc-border-light);
	padding: 8px 16px;
	border-radius: 24px;
	font-family: var(--bc-font-body);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	min-height: 48px; /* Touch target */
}

.bc-channel-btn.active, .bc-channel-btn:hover {
	background-color: var(--bc-bg-dark);
	color: var(--bc-accent);
	border-color: var(--bc-bg-dark);
}

/* 3. Feed Principal */
.bc-community-feed {
	padding: 24px;
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Botón Flotante (FAB) */
.bc-fab-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: var(--bc-accent);
	color: var(--bc-bg-dark);
	border: none;
	box-shadow: 0 4px 12px rgba(220, 165, 74, 0.4);
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 32px;
	cursor: pointer;
	z-index: 90;
	transition: transform 0.2s ease;
}
.bc-fab-btn:hover {
	transform: scale(1.05);
}


/* 4. Tarjetas del Feed */
.bc-feed-card {
	background-color: var(--bc-surface-white);
	border: 1px solid var(--bc-border-light);
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 4px 12px rgba(19, 18, 24, 0.04);
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
}
.bc-feed-card:hover, .bc-feed-card:focus {
	box-shadow: 0 8px 24px rgba(19, 18, 24, 0.08);
	border-color: var(--bc-accent-soft);
}

.bc-card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.bc-card-author-avatar {
	width: 40px;
	height: 40px;
}
.bc-card-meta {
	flex: 1;
	display: flex;
	flex-direction: column;
}
.bc-author-name {
	font-weight: 700;
	font-size: 15px;
}
.bc-time-ago {
	font-size: 12px;
	color: var(--bc-text-soft);
}
.bc-card-channel-tag {
	font-size: 12px;
	font-weight: 600;
	color: var(--bc-accent);
	background-color: var(--bc-bg-dark);
	padding: 4px 10px;
	border-radius: 12px;
}

.bc-card-title {
	font-family: var(--bc-font-heading);
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px 0;
	letter-spacing: -0.01em;
}

.bc-card-excerpt {
	font-size: 15px;
	color: var(--bc-text-soft);
	line-height: 1.5;
	margin-bottom: 16px;
	/* Truncar a 3 líneas */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bc-card-footer {
	border-top: 1px solid var(--bc-border-light);
	padding-top: 12px;
}
.bc-comments-count {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--bc-text-soft);
}

/* 5. Modales (Overlay y Contenedor) */
.bc-modal-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background-color: rgba(19, 18, 24, 0.8);
	z-index: 1000;
	display: flex;
	justify-content: center;
	align-items: flex-end; /* Para mobile sube desde abajo */
	backdrop-filter: blur(4px);
}

.bc-modal-content {
	background-color: var(--bc-surface-white);
	width: 100%;
	max-height: 90vh;
	border-radius: 24px 24px 0 0;
	display: flex;
	flex-direction: column;
	animation: slideUp 0.3s ease forwards;
}

@media (min-width: 768px) {
	.bc-modal-overlay {
		align-items: center;
		padding: 24px;
	}
	.bc-modal-content {
		max-width: 600px;
		border-radius: 16px;
		max-height: 85vh;
	}
	.bc-modal-full {
		max-width: 800px;
	}
}

@keyframes slideUp {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

.bc-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px;
	border-bottom: 1px solid var(--bc-border-light);
}

.bc-modal-title {
	font-family: var(--bc-font-heading);
	font-size: 20px;
	font-weight: 700;
	margin: 0;
}

.bc-modal-close {
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: var(--bc-text-soft);
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}
.bc-modal-close:hover {
	background-color: var(--bc-surface-light);
	color: var(--bc-text-main);
}

.bc-modal-body {
	padding: 24px;
	overflow-y: auto;
	flex: 1;
}

/* 6. Formularios */
.bc-form-group {
	margin-bottom: 20px;
}
.bc-form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 14px;
}
.bc-input, .bc-select, .bc-textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--bc-border-light);
	border-radius: 8px;
	font-family: var(--bc-font-body);
	font-size: 16px; /* 16px evita zoom en iOS */
	background-color: var(--bc-surface-light);
	color: var(--bc-text-main);
	transition: border-color 0.2s;
}
.bc-input:focus, .bc-select:focus, .bc-textarea:focus {
	outline: none;
	border-color: var(--bc-accent);
	background-color: var(--bc-surface-white);
}
.bc-textarea {
	min-height: 120px;
	resize: vertical;
}

/* Botones Universales */
.bc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 8px;
	font-family: var(--bc-font-body);
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.2s;
	border: none;
	min-height: 48px;
}
.bc-btn-primary {
	background-color: var(--bc-accent);
	color: var(--bc-bg-dark);
}
.bc-btn-primary:hover {
	background-color: var(--bc-accent-soft);
}
