/**
 * Almaden Publisher Page Stylesheet
 * Estructura de 2 columnas inspirada en Profile Page (Sidebar 320px + Content Area)
 * adaptada para sellos editoriales y organizaciones.
 */

#almaden-publisher-app-body {
	font-family: "Urbanist", sans-serif;
	background: #ffffff;
	color: #0f172a;
	overflow-x: clip;
}

#almaden-publisher-app-body main {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
}

#almaden-publisher-page.almaden-app-content-shell {
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	width: 100% !important;
	background-color: transparent !important;
}

#almaden-publisher-page {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* ---------- Hero Banner ---------- */
#almaden-publisher-page .almaden-publisher-hero {
	position: relative;
	width: 100% !important;
	min-height: calc(100vh - 64px);
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-attachment: fixed !important;
	transition: background 0.3s ease;
	display: flex;
	flex-direction: column;
}

#almaden-publisher-page .almaden-publisher-hero-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

#almaden-publisher-page .almaden-publisher-hero-inner {
	position: relative;
	width: 100%;
	max-width: 80rem; /* max-w-7xl */
	margin: 0 auto;
	padding: 2rem 1rem 4rem;
}

@media (min-width: 640px) {
	#almaden-publisher-page .almaden-publisher-hero-inner {
		padding: 2rem 2rem 4rem;
	}
}

/* ---------- 2-Column Layout ---------- */
#almaden-publisher-page .almaden-publisher-layout {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 2rem;
	align-items: flex-start;
}

@media (min-width: 1024px) {
	#almaden-publisher-app-body:has(.almaden-publisher-hero) {
		overflow-y: hidden;
	}

	#almaden-publisher-page .almaden-publisher-hero {
		height: calc(100dvh - 64px);
		min-height: calc(100dvh - 64px);
		max-height: calc(100dvh - 64px);
		overflow: hidden;
	}

	#almaden-publisher-page .almaden-publisher-hero-inner {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		min-height: 0;
		height: 100%;
		padding-top: 32px !important;
		padding-bottom: 30px !important;
		box-sizing: border-box;
	}

	#almaden-publisher-page .almaden-publisher-layout {
		flex: 1 1 auto;
		flex-direction: row;
		min-height: 0;
		height: 100%;
		align-items: flex-start;
	}
}

/* ---------- Left Sidebar ---------- */
#almaden-publisher-page .almaden-publisher-sidebar {
	width: 100%;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

@media (min-width: 1024px) {
	#almaden-publisher-page .almaden-publisher-sidebar {
		width: 320px;
		max-height: 100%;
		align-self: flex-start;
		z-index: 30;
	}

	#almaden-publisher-page .almaden-publisher-panel {
		max-height: 100%;
		display: flex;
		flex-direction: column;
	}
}

#almaden-publisher-page .almaden-publisher-panel {
	background: #ffffff;
	border-radius: 1rem;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	width: 100%;
	border: 1px solid #e4e4e7;
}

#almaden-publisher-page .almaden-publisher-profile-section {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
}

#almaden-publisher-page .almaden-publisher-nav-scroll-section {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
	padding-right: 0.25rem;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
	-webkit-overflow-scrolling: touch;
}

#almaden-publisher-page .almaden-publisher-nav-scroll-section::-webkit-scrollbar {
	width: 4px;
}

#almaden-publisher-page .almaden-publisher-nav-scroll-section::-webkit-scrollbar-track {
	background: transparent;
}

#almaden-publisher-page .almaden-publisher-nav-scroll-section::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 9999px;
}

#almaden-publisher-page .almaden-publisher-nav-scroll-section::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.35);
}

/* Logo / Isotipo */
#almaden-publisher-page .almaden-publisher-logo-box {
	width: 4rem;
	height: 4rem;
	border-radius: 0.85rem;
	overflow: hidden;
	background: #f4f4f5;
	position: relative;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	border: 2px solid #ffffff;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

#almaden-publisher-page .almaden-publisher-logo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

#almaden-publisher-page .almaden-publisher-initial {
	width: 100%;
	height: 100%;
	font-size: 1.5rem;
	font-weight: 800;
	color: #0f172a;
	background: #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Collapsible Bio / Reseña */
#almaden-publisher-page .almaden-publisher-bio-chevron {
	flex: 0 0 auto;
	transition: transform 0.25s ease;
}

#almaden-publisher-page .almaden-publisher-bio-toggle[aria-expanded="true"] .almaden-publisher-bio-chevron {
	transform: rotate(180deg);
}

#almaden-publisher-page .almaden-publisher-bio-toggle:focus-visible {
	outline: 2px solid #000000;
	outline-offset: 4px;
	border-radius: 4px;
}

#almaden-publisher-page .almaden-publisher-bio-collapse {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.3s ease;
}

#almaden-publisher-page .almaden-publisher-bio-collapse[data-open="true"] {
	grid-template-rows: 1fr;
}

#almaden-publisher-page .almaden-publisher-bio-collapse-inner {
	min-height: 0;
	overflow: hidden;
}

/* ---------- Navbar Vertical (Tabs) ---------- */
#almaden-publisher-page .almaden-publisher-tab {
	cursor: pointer;
	border: 0;
	background: transparent;
	transition: all 0.2s ease;
}

#almaden-publisher-page .almaden-publisher-tab[aria-selected="true"] {
	background-color: #000000 !important;
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

#almaden-publisher-page .almaden-publisher-tab[aria-selected="false"]:hover {
	background-color: #f4f4f5;
	color: #000000;
}

/* ---------- Right Content Area ---------- */
#almaden-publisher-page .almaden-publisher-content-area {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 1rem;
	border: 1px solid #e4e4e7;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	padding: 0 !important;
	position: relative;
	z-index: 10;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	width: 100%;
}

@media (min-width: 1024px) {
	#almaden-publisher-page .almaden-publisher-content-area {
		height: 100%;
		max-height: 100%;
	}
}

#almaden-publisher-page .almaden-publisher-tabpanel {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
}

#almaden-publisher-page .almaden-publisher-tabpanel[hidden] {
	display: none !important;
}

#almaden-publisher-page .almaden-publisher-content-header {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem 2rem;
	background: #ffffff;
	border-bottom: 1px solid #e4e4e7;
	z-index: 20;
}

@media (min-width: 640px) {
	#almaden-publisher-page .almaden-publisher-content-header {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

#almaden-publisher-page .almaden-publisher-content-header-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

#almaden-publisher-page .almaden-publisher-search-bar {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

@media (min-width: 640px) {
	#almaden-publisher-page .almaden-publisher-search-bar {
		width: 220px;
		transition: width 0.2s ease;
	}

	#almaden-publisher-page .almaden-publisher-search-bar:focus-within {
		width: 280px;
	}
}

#almaden-publisher-page .almaden-publisher-search-input {
	width: 100%;
	padding: 0.4rem 1.75rem 0.4rem 2rem;
	font-size: 0.8125rem;
	border: none;
	border-bottom: 1px solid #cbd5e1;
	border-radius: 0;
	background: transparent;
	color: #0f172a;
	outline: none;
	transition: all 0.2s ease;
}

#almaden-publisher-page .almaden-publisher-search-input:focus {
	background: transparent;
	border-bottom-color: #000000;
	box-shadow: none;
}

#almaden-publisher-page .almaden-publisher-search-icon {
	position: absolute;
	left: 0.65rem;
	width: 0.875rem;
	height: 0.875rem;
	color: #71717a;
	pointer-events: none;
}

#almaden-publisher-page .almaden-publisher-search-clear {
	position: absolute;
	right: 0.5rem;
	display: none;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
	font-size: 0.75rem;
	line-height: 1;
	border-radius: 9999px;
	background: #e4e4e7;
	color: #71717a;
	border: 0;
	cursor: pointer;
	padding: 0;
}

#almaden-publisher-page .almaden-publisher-content-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1.75rem 2rem 2.5rem;
	-webkit-overflow-scrolling: touch;
}

#almaden-publisher-page .almaden-publisher-content-body::-webkit-scrollbar {
	width: 6px;
}

#almaden-publisher-page .almaden-publisher-content-body::-webkit-scrollbar-track {
	background: transparent;
}

#almaden-publisher-page .almaden-publisher-content-body::-webkit-scrollbar-thumb {
	background: #d4d4d8;
	border-radius: 9999px;
}

#almaden-publisher-page .almaden-publisher-content-body::-webkit-scrollbar-thumb:hover {
	background: #a1a1aa;
}

@media (max-width: 1023px) {
	#almaden-publisher-page .almaden-publisher-content-area {
		height: auto;
		max-height: none;
		min-height: 0;
		overflow: visible;
	}

	#almaden-publisher-page .almaden-publisher-content-header {
		position: sticky;
		top: 4.5rem;
		border-radius: 1rem 1rem 0 0;
	}

	#almaden-publisher-page .almaden-publisher-content-body {
		overflow-y: visible;
		padding: 1.5rem;
	}
}

/* ---------- Badges para Envíos a Bodega ---------- */
.almaden-inbound-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: 9999px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.025em;
	text-transform: uppercase;
	border: 1px solid transparent;
}
.almaden-inbound-badge.badge-neutral {
	background-color: #f4f4f5;
	color: #52525b;
	border-color: #e4e4e7;
}
.almaden-inbound-badge.badge-primary {
	background-color: #eff6ff;
	color: #1d4ed8;
	border-color: #bfdbfe;
}
.almaden-inbound-badge.badge-success {
	background-color: #ecfdf5;
	color: #047857;
	border-color: #a7f3d0;
}
.almaden-inbound-badge.badge-warning {
	background-color: #fffbeb;
	color: #b45309;
	border-color: #fde68a;
}
.almaden-inbound-badge.badge-danger {
	background-color: #fff1f2;
	color: #be123c;
	border-color: #fecdd3;
}
