/**
 * Index Sticky Button - Base Styles
 * @package IndexStickyButton
 */

/* Container */
#isb-sticky-button {
	position: fixed;
	right: 1rem;        /* 16px */
	bottom: 1rem;       /* 16px */
	z-index: 999999;
}

/* Inline-Button (Shortcode [isb_button]) */
.isb-inline-button {
	display: inline-block;
}

/* Button-Link – geteilt zwischen Sticky und Inline */
#isb-sticky-button .isb-button-link,
.isb-inline-button .isb-button-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	position: relative;
	padding: 1rem;
	border-radius: 999px;           /* Pille – bleibt px (bewusst großer Wert) */
	text-decoration: none;
	background: var(--isb-btn-bg, #2271b1);
	color: var(--isb-btn-color, #fff);
	font-weight: 600;
	box-shadow: 0 0 0.8rem rgba(0, 0, 0, 0.5);  /* 0 2px 8px */
	transition: all 0.3s ease;
	cursor: pointer;
}

/* Kalender-Icon (::before)
   mask-image + background-color:currentColor statt background-image,
   damit das Icon die konfigurierte Textfarbe (--isb-btn-color) übernimmt */
#isb-sticky-button .isb-button-link::before,
.isb-inline-button .isb-button-link::before {
	display: inline-block !important;
	vertical-align: middle !important;
	content: "";
	flex-shrink: 0;
	width: 1.1rem;
	height: 1.3rem;
	margin-top: -0.3125rem !important;  /* -5px */
	background-color: currentColor;
	-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 14"><path fill="black" d="M2.6,1.3v0.8H1.3C0.6,2.1,0,2.7,0,3.4v1.2h12V3.4c0-0.7-0.6-1.2-1.3-1.2H9.4V1.3c0-0.4-0.4-0.8-0.8-0.8c-0.5,0-0.9,0.4-0.9,0.8v0.8H4.3V1.3c0-0.4-0.4-0.8-0.9-0.8S2.6,0.9,2.6,1.3z M12,5.4H0v7c0,0.7,0.6,1.2,1.3,1.2h9.4c0.7,0,1.3-0.5,1.3-1.2V5.4z"/></svg>');
	mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 14"><path fill="black" d="M2.6,1.3v0.8H1.3C0.6,2.1,0,2.7,0,3.4v1.2h12V3.4c0-0.7-0.6-1.2-1.3-1.2H9.4V1.3c0-0.4-0.4-0.8-0.8-0.8c-0.5,0-0.9,0.4-0.9,0.8v0.8H4.3V1.3c0-0.4-0.4-0.8-0.9-0.8S2.6,0.9,2.6,1.3z M12,5.4H0v7c0,0.7,0.6,1.2,1.3,1.2h9.4c0.7,0,1.3-0.5,1.3-1.2V5.4z"/></svg>');
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-position: center;
	mask-position: center;
}

/* Hover-Effekt */
#isb-sticky-button .isb-button-link:hover,
.isb-inline-button .isb-button-link:hover {
	transform: scale(1.08);
}

/* Focus für Barrierefreiheit */
#isb-sticky-button .isb-button-link:focus,
.isb-inline-button .isb-button-link:focus {
	outline: 2px solid #1b4f82;     /* Outline bleibt px – Pixel-genaue Fokusanzeige */
	outline-offset: 2px;
}

/* Button-Text */
#isb-sticky-button .isb-button-text,
.isb-inline-button .isb-button-text {
	font-size: 1rem;    /* 16px */
	line-height: 1.2;
}

/* Responsive: Mobile
   – Button-Text visuell ausblenden (bleibt für Screenreader lesbar),
     nur noch Icon sichtbar → Button wird zum kompakten Kreis */
@media (max-width: 48rem) {     /* 768px */
	#isb-sticky-button {
		right: 0.75rem;     /* 12px */
		bottom: 0.75rem;    /* 12px */
	}

	#isb-sticky-button .isb-button-link {
		padding: 1rem 0.95rem;  /* 10px */
	}

	#isb-sticky-button .isb-button-text {
		/* Visuell versteckt, aber für assistive Technologien lesbar
		   (Entspricht der gängigen .sr-only / .visually-hidden Technik)
		   1px-Werte sind hier bewusst – rem würde die Technik destabilisieren */
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}
