/**
 * The bookmark save button (tour, guide, and blog pages), the end-of-read save
 * block on long guides, and the one-time "here is where it went" toast.
 *
 * Quiet inline pill; flips to a confirmed state once saved. The bookmark icon
 * carries two paths (outline + fill) and CSS picks which is visible, so the saved
 * state flips instantly with no second request and no layout shift.
 */
.lbi-save-page {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin: .25rem 0 .75rem;
	padding: .4rem .9rem;
	font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .74rem;
	letter-spacing: .04em;
	color: #00708b;
	background: transparent;
	border: 1px solid #00708b;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.lbi-save-page:hover {
	background: #00708b;
	color: #fff;
}

.lbi-save-page.is-saved {
	color: #008542;
	border-color: #008542;
	background: transparent;
	cursor: pointer;
}

.lbi-save-page.is-saved:hover {
	background: #f2f8f4;
	color: #007033;
}

.lbi-save-page:disabled {
	opacity: .6;
	cursor: wait;
}

/* Unsaved: outline bookmark. Saved: filled. */
.lbi-save-page__icon {
	flex: none;
	display: block;
}
.lbi-save-page .lbi-save-page__icon-fill { display: none; }
.lbi-save-page.is-saved .lbi-save-page__icon-outline { display: none; }
.lbi-save-page.is-saved .lbi-save-page__icon-fill { display: block; }

/* ---- End-of-read block (long guides only) ---- */
.lbi-save-block {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem 1.25rem;
	margin: 2rem 0 1rem;
	padding: 1.1rem 1.35rem;
	border: 1px solid rgba(0, 112, 139, .25);
	border-radius: 14px;
	background: rgba(0, 112, 139, .05);
}

.lbi-save-block__copy {
	margin: 0;
	font-size: .98rem;
	line-height: 1.5;
	color: #303942;
}

/* The button inside the block carries the long label and needs no top margin. */
.lbi-save-block .lbi-save-page {
	margin: 0;
	padding: .5rem 1.1rem;
	font-size: .78rem;
}

/* The "see it on your dashboard" link: hidden until the guide is saved, then it
   takes its own line under the copy/button row (the block is flex-wrap). */
.lbi-save-block__dash {
	display: none;
	flex: 1 1 100%;
	margin: 0;
	font-size: .88rem;
	font-weight: 600;
	text-underline-offset: 2px;
}
.lbi-save-block.is-saved .lbi-save-block__dash {
	display: inline-block;
}
/* Opt out of the pierce theme's full-width gradient link marker (theme CSS
   gotcha): the block's own teal with a plain text underline. The .lbi-save-block
   ancestor bump clears `.content a` (0,2,0 > 0,1,1). */
.lbi-save-block .lbi-save-block__dash {
	color: #00708b;
	background-image: none;
	text-decoration: underline;
}
.lbi-save-block .lbi-save-block__dash:hover {
	color: #005c72;
}

/* ---- One-time toast ---- */
.lbi-save-toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	z-index: 9999;
	display: flex;
	align-items: center;
	gap: .6rem;
	max-width: calc(100vw - 2rem);
	padding: .85rem 1.1rem;
	font-size: .95rem;
	line-height: 1.35;
	color: #fff;
	background: #303942;
	border-radius: 12px;
	box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55);
	/* Start below the fold and slide up; transform includes the centring shift. */
	transform: translate(-50%, 130%);
	opacity: 0;
	transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}

.lbi-save-toast.is-in {
	transform: translate(-50%, 0);
	opacity: 1;
}

.lbi-save-toast__text { font-weight: 600; }

.lbi-save-toast__link {
	color: #7ee2b8;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}
.lbi-save-toast__link:hover { color: #a8f0d0; }

.lbi-save-toast__close {
	flex: none;
	margin-left: .2rem;
	padding: 0 .2rem;
	font-size: 1.15rem;
	line-height: 1;
	color: rgba(255, 255, 255, .65);
	background: none;
	border: 0;
	cursor: pointer;
}
.lbi-save-toast__close:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
	.lbi-save-toast {
		transition: opacity .2s ease;
		transform: translate(-50%, 0);
	}
}

/* ---- Archive card overlay: an icon-only bookmark in the corner of the card image.
   Injected by save-button.js on the tour and blog archives (the templates live in a
   shared plugin / the theme and are never edited). .lbi-save-anchor is added to the
   image element so the button positions against it. Reuses the base pill's circular
   radius; the label is kept for assistive tech but hidden. ---- */
.lbi-save-anchor {
	position: relative;
}

/* The /hawaii-blog/ FacetWP listing's featured-image item: the overlay is a
   server-rendered sibling appended after the image inside `.fwpl-item.fim`, so
   that item is the positioning context (the image fills it). */
.fwpl-item.fim {
	position: relative;
}

.lbi-save-page--overlay {
	position: absolute;
	top: .5rem;
	right: .5rem;
	z-index: 3;
	margin: 0;
	padding: 0;
	width: 2.1rem;
	height: 2.1rem;
	gap: 0;
	justify-content: center;
	color: #00708b;
	background: rgba(255, 255, 255, .93);
	border: 1px solid rgba(0, 0, 0, .08);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}

.lbi-save-page--overlay:hover {
	background: #fff;
	color: #005c72;
}

.lbi-save-page--overlay.is-saved {
	color: #008542;
	background: #fff;
	border-color: rgba(0, 133, 66, .35);
}

.lbi-save-page--overlay.is-saved:hover {
	background: #fff;
	color: #007033;
}

.lbi-save-page--overlay .lbi-save-page__icon {
	width: 18px;
	height: 18px;
}

/* Icon-only: the label stays in the DOM for screen readers, hidden visually. */
.lbi-save-page--overlay .lbi-save-page__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* A save that failed says so where the button is (UX-M6): announced, visible
   on touch, and not clipped like the overlay's label. */
.lbi-save-page__alert {
	display: inline-block;
	margin-left: .5rem;
	padding: .2rem .5rem;
	font-size: .8rem;
	line-height: 1.3;
	color: #7a1c1c;
	background: #fdecec;
	border: 1px solid #f3b5b5;
	border-radius: 4px;
	max-width: 22rem;
}

.lbi-save-anchor .lbi-save-page__alert {
	position: absolute;
	right: .5rem;
	bottom: .5rem;
	margin: 0;
	z-index: 3;
}
