/* ==========================================================
   Astrocamp Sidebars — Ausklapp-Panels (site-weit)
   Mastodon-Feed (links) & Community/Astrobin-Links (rechts)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600&family=Public+Sans:wght@400;500;600&display=swap');

.astro-tab {
	position: fixed;
	z-index: 9150; /* über dem Panel (9100), damit die Lasche beim Ausklappen anklickbar bleibt */
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 10px;
	background: #1B2626;
	color: #FFF8E7;
	border: 1px solid rgba(255,248,231,0.14);
	box-shadow: 0 0 24px rgba(0,0,0,0.35);
	cursor: grab;
	font-family: 'Public Sans', system-ui, sans-serif;
	font-size: 12px;
	letter-spacing: 0.06em;
	font-weight: 600;
	transition: background 0.15s ease, box-shadow 0.15s ease;
	/* Vertikal frei verschiebbar (siehe panels.js) — verhindert, dass mobile
	   Wischgesten auf der Lasche selbst stattdessen die Seite scrollen, und
	   dass beim Ziehen Text/Icon markiert werden. */
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
}
.astro-tab svg { flex-shrink: 0; }

.astro-tab-left {
	left: 0;
	/* Default: unten am Rand statt in der Bildschirmmitte — dort war die
	   Lasche vor allem mobil oft im Weg. env(...) hält Abstand zur "Home
	   Indicator"-Zone auf iPhones ohne Home-Button. Per JS frei verschiebbar,
	   die zuletzt gezogene Position überschreibt das (siehe panels.js). */
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	border-left: none;
	border-radius: 0 8px 8px 0;
}
.astro-tab-left span { writing-mode: vertical-rl; }

.astro-tab-right {
	right: 0;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	border-right: none;
	border-radius: 8px 0 0 8px;
}
.astro-tab-right span { writing-mode: vertical-rl; transform: rotate(180deg); }
.astro-tab-right svg { transform: rotate(180deg); }

.astro-tab:hover { background: #22302f; }

.astro-tab.astro-tab-dragging {
	cursor: grabbing;
	transition: none; /* kein Nachlaufen der Hintergrund-Transition während des Ziehens */
	box-shadow: 0 0 0 1px #009DD4, 0 4px 28px rgba(0,0,0,0.55);
}

/* Die Lasche bleibt an ihrer Kante stehen (links/rechts am Bildschirmrand) —
   sie liegt dort ohnehin schon "innerhalb" des sich öffnenden Panels, das an
   derselben Kante aufklappt. Der höhere z-index sorgt dafür, dass sie beim
   ausgeklappten Panel weiterhin sichtbar und anklickbar obenauf liegt (statt
   dahinter zu verschwinden) und so direkt zum Wieder-Einklappen dient —
   ohne dass man mobil erst eine schmale leere Fläche treffen muss. */
.astro-tab[aria-expanded="true"] {
	box-shadow: 0 0 0 1px #009DD4, 0 0 24px rgba(0,0,0,0.45);
}

/* ---------- Panel-Grundgerüst ---------- */

.astro-panel {
	position: fixed;
	top: 0;
	bottom: 0;
	width: min(360px, 88vw);
	background: #1B2626;
	color: #FFF8E7;
	font-family: 'Public Sans', system-ui, sans-serif;
	z-index: 9100;
	display: flex;
	flex-direction: column;
	box-shadow: 0 0 40px rgba(0,0,0,0.5);
	transition: transform 0.25s ease;
}

.astro-panel-left { left: 0; transform: translateX(-100%); border-right: 1px solid rgba(255,248,231,0.12); }
.astro-panel-right { right: 0; transform: translateX(100%); border-left: 1px solid rgba(255,248,231,0.12); }

.astro-panel.is-open { transform: translateX(0); }

.astro-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px;
	border-bottom: 1px solid rgba(255,248,231,0.10);
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: 18px;
	font-weight: 600;
}
.astro-panel-header span { display: flex; align-items: center; gap: 10px; }

.astro-panel-close {
	background: none;
	border: none;
	color: #FFF8E7;
	opacity: 0.6;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
}
.astro-panel-close:hover { opacity: 1; }

.astro-panel-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	/* Scrollleiste sichtbar machen (Standard-Dunkel verschwindet auf dem
	   dunklen Panel-Hintergrund) — Firefox: */
	scrollbar-width: thin;
	scrollbar-color: #009DD4 rgba(255,248,231,0.08);
}
/* Chrome/Safari/Edge: */
.astro-panel-body::-webkit-scrollbar { width: 8px; }
.astro-panel-body::-webkit-scrollbar-track { background: rgba(255,248,231,0.06); }
.astro-panel-body::-webkit-scrollbar-thumb {
	background: #009DD4;
	border-radius: 4px;
}
.astro-panel-body::-webkit-scrollbar-thumb:hover { background: #4DC3EA; }

.astro-panel-hint { font-size: 13px; opacity: 0.55; margin: 0; }

/* ---------- Community & Links ---------- */

.astro-panel-section { display: flex; flex-direction: column; gap: 10px; }

.astro-panel-label {
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.5;
	margin-bottom: 4px;
}
.astro-panel-label-blue { color: #009DD4; opacity: 0.85; }
.astro-panel-label-red { color: #FE0000; opacity: 0.85; }

.astro-panel-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	border: 1px solid rgba(255,248,231,0.08);
	border-radius: 4px;
	color: #FFF8E7;
	text-decoration: none;
	font-size: 14px;
}
.astro-panel-link:hover { border-color: #009DD4; color: #FFF8E7; }
.astro-panel-link-red:hover { border-color: #FE0000; }

/* ---------- Mastodon-Feed ---------- */

.astro-toot {
	display: flex;
	gap: 12px;
	padding: 14px;
	border: 1px solid rgba(255,248,231,0.08);
	border-radius: 4px;
}
.astro-toot-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: rgba(0,157,212,0.18); }
.astro-toot-handle { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.astro-toot-text { font-size: 13px; line-height: 1.5; opacity: 0.85; }
.astro-toot-media {
	display: block;
	width: 100%;
	max-height: 140px;
	object-fit: cover;
	border-radius: 4px;
	margin-top: 8px;
}
.astro-toot-date { font-size: 11px; opacity: 0.45; margin-top: 6px; }

.astro-panel-follow {
	display: block;
	padding: 22px 24px;
	border-top: 1px solid rgba(255,248,231,0.10);
	color: #009DD4;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}
.astro-panel-follow:hover { color: #4DC3EA; }

/* ---------- Overlay beim Öffnen (Mobile) ---------- */

.astro-panel-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.4);
	z-index: 9050;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}
.astro-panel-overlay.is-visible { opacity: 1; pointer-events: auto; }
