/* LogAlt Link Resurrector — lightbox styling.
   Colours sampled from the live glaad.org homepage 2026-07-29 (Heidi's request: "our standard
   site dk blue button coloring w/ light blue on hover, dark blue on trim around").
     --lr-blue-dark  #0612bc  the LEARN MORE button
     --lr-blue-light #4eadda  the main nav bar
   Hover INVERTS rather than just swapping the fill: white on #4eadda is 2.53:1 and fails WCAG AA,
   while #0612bc on #4eadda is 4.57:1 and passes. Default state is 11.5:1. */

.logalt-lr-modal,
.logalt-lr-cta {
	--lr-blue-dark: #0612bc;
	--lr-blue-light: #4eadda;
}

.logalt-lr-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 20, 34, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	z-index: 100000;
	overflow-y: auto;
}
.logalt-lr-overlay[hidden] { display: none; }

.logalt-lr-dialog {
	background: #fff;
	color: #1c2333;
	max-width: 520px;
	width: 100%;
	border-radius: 12px;
	padding: 1.75rem 1.75rem 1.25rem;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	position: relative;
	font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
}

.logalt-lr-close {
	position: absolute;
	top: 0.5rem;
	right: 0.6rem;
	background: none;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
}
.logalt-lr-close:hover { color: #111; }

.logalt-lr-heading {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	padding-right: 1.5rem;
}
.logalt-lr-body { margin-bottom: 1.25rem; }
.logalt-lr-body p { margin: 0 0 0.75rem; }

.logalt-lr-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: stretch;      /* equal heights whatever element each button is */
	margin: 0;
}

/* ── BUTTONS ────────────────────────────────────────────────────────────────────────────────────
   The archive action is an <a> and "Keep reading" is a <button>. With plain inline-block + padding
   the <a> inherits the THEME's line-height while the <button> uses UA metrics, so the two labels
   sat at different heights and the boxes were different sizes (reported 2026-07-27).
   inline-flex + centred alignment + an explicit line-height makes the element type irrelevant.

   Selectors are scoped to a parent so they outrank theme button rules — SmartMag was overriding
   the ghost variant entirely, rendering it solid black and uppercase instead of outlined. */
.logalt-lr-btn {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border-radius: 8px;
	border: 0;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	background: var(--lr-blue-dark, #0612bc);
	color: #fff;
	border: 2px solid var(--lr-blue-dark, #0612bc);
}
.logalt-lr-btn[hidden] { display: none; }
.logalt-lr-btn:hover,
.logalt-lr-btn:focus-visible {
	background: var(--lr-blue-light, #4eadda);
	color: var(--lr-blue-dark, #0612bc);
	border-color: var(--lr-blue-dark, #0612bc);   /* dark blue trim retained on hover */
}

.logalt-lr-actions .logalt-lr-btn,
.logalt-lr-cta__actions .logalt-lr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
	font-family: inherit;
	font-size: 0.95rem;
	text-transform: none;      /* stop the theme uppercasing "Keep reading" */
	letter-spacing: normal;
	box-sizing: border-box;
	min-height: 2.75rem;       /* comfortable tap target */
	-webkit-appearance: none;
	appearance: none;
	text-align: center;
}
.logalt-lr-actions .logalt-lr-btn[hidden],
.logalt-lr-cta__actions .logalt-lr-btn[hidden] { display: none; }

.logalt-lr-actions .logalt-lr-btn--ghost {
	background: transparent;
	color: var(--lr-blue-dark, #0612bc);
	border: 2px solid var(--lr-blue-dark, #0612bc);
}
.logalt-lr-actions .logalt-lr-btn--ghost:hover,
.logalt-lr-actions .logalt-lr-btn--ghost:focus-visible {
	background: var(--lr-blue-light, #4eadda);
	color: var(--lr-blue-dark, #0612bc);
}

/* ── CALL TO ACTION ─────────────────────────────────────────────────────────────────────────────
   Sits below the buttons. Separated by a rule so it reads as a distinct message rather than as
   more of the link explanation. Content is admin-authored, so style the tags it may contain. */
.logalt-lr-cta {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e5e7eb;
}
.logalt-lr-cta[hidden] { display: none; }

.logalt-lr-cta__body {
	font-size: 0.9rem;
	line-height: 1.55;
	color: #374151;
}
.logalt-lr-cta__body p { margin: 0 0 0.75rem; }
.logalt-lr-cta__body p:last-child { margin-bottom: 0; }
.logalt-lr-cta__body a {
	color: var(--lr-blue-dark, #0612bc);
	text-decoration: underline;
}

/* Donation CTA button. Its own hook so Melissa has one place to change the ask's treatment.
   Currently inherits the primary fill; the two buttons never appear side by side (separate
   sections, divided by a rule) so they do not clash today. */
.logalt-lr-cta__actions .logalt-lr-btn--cta {
	background: var(--lr-blue-dark, #0612bc);
	color: #fff;
	border: 2px solid var(--lr-blue-dark, #0612bc);
}
.logalt-lr-cta__actions .logalt-lr-btn--cta:hover,
.logalt-lr-cta__actions .logalt-lr-btn--cta:focus-visible {
	background: var(--lr-blue-light, #4eadda);
	color: var(--lr-blue-dark, #0612bc);
}

.logalt-lr-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1rem 0 0;
}

@media (max-width: 480px) {
	.logalt-lr-dialog { padding: 1.25rem; }
	.logalt-lr-actions,
	.logalt-lr-cta__actions { flex-direction: column; }
	.logalt-lr-actions .logalt-lr-btn,
	.logalt-lr-cta__actions .logalt-lr-btn { width: 100%; }
}
