/**
 * Back Link Module Styles - Abschlussleiste
 *
 * Links: Zurueck-Link, rechts: Teilen-Icons.
 *
 * @package WP_R2Go4_Detail
 */

.wp-r2go4-back-link-module {
	width: 100%;
}

.wp-r2go4-back-link-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.wp-r2go4-back-link-left {
	min-width: 0;
}

.wp-r2go4-back-link-right {
	min-width: 0;
}

/* ============================================
   Zurueck-Link (links)
   ============================================ */

/* Farbe aus der CI-Einstellung des Plugins (Allgemein > CI-Farben), nicht aus
   der Theme-Palette. Damit folgt die ganze Leiste automatisch der CI des Kunden,
   und links (Zurueck-Link) und rechts (Teilen) sind garantiert derselbe Ton. */
.wp-r2go4-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--wp-r2go4-ci-color-1, #aa9a7f);
	background: transparent;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
	margin-left: 0;
	padding: 0;
	border: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.wp-r2go4-back-link:hover {
	opacity: 0.7;
	text-decoration: none;
	color: var(--wp-r2go4-ci-color-1, #aa9a7f);
}

.wp-r2go4-back-link-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.wp-r2go4-back-link-text {
	font-weight: 500;
}

/* ============================================
   Teilen (rechts)
   ============================================ */

.wp-r2go4-share {
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative;
}

/* Dieselbe Farbquelle und Typo wie .wp-r2go4-back-link - beide sitzen in
   derselben Leiste und muessen denselben Ton haben. */
.wp-r2go4-share-label {
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--wp-r2go4-ci-color-1, #aa9a7f);
	white-space: nowrap;
}

.wp-r2go4-share-list {
	display: flex;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wp-r2go4-share-item {
	margin: 0;
	padding: 0;
}

.wp-r2go4-share-item[hidden] {
	display: none;
}

/* Icon-Button: 40x40 -> erfuellt die 44px-Touch-Empfehlung knapp nicht,
   deshalb auf Mobile weiter unten vergroessert.
   Ruhezustand: CI-Farbe als Kontur und Icon, transparenter Grund.
   Hover: gefuellt in CI-Farbe mit weissem Icon - genau wie die uebrigen
   Buttons der Seite (Senden, Hero-Nav). */
.wp-r2go4-share-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--wp-r2go4-ci-color-1, #aa9a7f);
	border-radius: 50%;
	background-color: transparent;
	color: var(--wp-r2go4-ci-color-1, #aa9a7f);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wp-r2go4-share-link:hover,
.wp-r2go4-share-link:focus-visible {
	background-color: var(--wp-r2go4-ci-color-1, #aa9a7f);
	border-color: var(--wp-r2go4-ci-color-1, #aa9a7f);
	color: #fff;
}

.wp-r2go4-share-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Rueckmeldung nach "Link kopiert".
   Hintergrund bewusst die Textfarbe (CI 2, dunkel) und NICHT die Link-/
   Akzentfarbe: die ist bei diesem Design beige, weisse Schrift darauf
   waere praktisch unlesbar. */
.wp-r2go4-share-feedback {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	padding: 6px 12px;
	border-radius: 4px;
	background-color: var(--wp-r2go4-ci-color-2, #333);
	color: #fff;
	font-size: 13px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.wp-r2go4-share-feedback-visible {
	opacity: 1;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
	.wp-r2go4-back-link-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}

	/* Groessere Touch-Targets auf dem Handy */
	.wp-r2go4-share-link {
		width: 44px;
		height: 44px;
	}

	.wp-r2go4-share-feedback {
		right: auto;
		left: 0;
	}
}
