/* ==========================================================================
   Shared Components — Lee's Supper Club
   --------------------------------------------------------------------------
   Reusable UI components, buttons, badges, utility classes, image
   placeholders, accessibility focus styles, and print styles.
   ========================================================================== */


/* ==========================================================================
   1. Buttons — Base
   ========================================================================== */

.btn {
	display: inline-block;
	padding: var(--space-xs) var(--space-lg);
	font-family: var(--font-primary);
	font-weight: var(--fw-medium);
	font-size: 1rem;
	text-decoration: none;
	text-align: center;
	transition: all var(--transition-base);
	cursor: pointer;
	border: none;
	border-radius: 4px;
	line-height: 1.5;
}

.btn:focus-visible {
	outline: 2px solid var(--color-teal);
	outline-offset: 2px;
}


/* ==========================================================================
   2. Button Variants
   ========================================================================== */

/* Primary — teal background */
.btn-primary {
	background: var(--color-teal);
	color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
	background: var(--color-black);
	color: var(--color-white);
}

/* Secondary — black background */
.btn-secondary {
	background: var(--color-black);
	color: var(--color-white);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
	background: var(--color-gray-dark);
	color: var(--color-white);
}

/* Outline — teal border, transparent fill */
.btn-outline {
	border: 2px solid var(--color-teal);
	color: var(--color-teal);
	background: transparent;
}

.btn-outline:hover,
.btn-outline:focus-visible {
	background: var(--color-teal);
	color: var(--color-white);
}

/* .btn-white is defined in homepage.css (single source of truth) */


/* ==========================================================================
   3. Badges
   ========================================================================== */

.badge,
.category-badge {
	display: inline-block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: var(--fw-medium);
	color: var(--color-teal);
	text-decoration: none;
}

.badge:hover,
.category-badge:hover,
.badge:focus-visible,
.category-badge:focus-visible {
	text-decoration: underline;
}


/* ==========================================================================
   4. Section Heading
   ========================================================================== */

.section-heading {
	text-align: center;
	font-size: 1.8rem;
	font-weight: var(--fw-medium);
	margin-bottom: var(--space-xl);
}


/* ==========================================================================
   5. Utility Classes
   ========================================================================== */

/* Text alignment */
.text-center {
	text-align: center;
}

.text-left {
	text-align: left;
}

.text-right {
	text-align: right;
}

/* Text color */
.text-white {
	color: var(--color-white);
}

/* Background colors */
.bg-teal {
	background-color: var(--color-teal);
}

.bg-green {
	background-color: var(--color-green);
}

.bg-pink {
	background-color: var(--color-pink);
}

/* Screen reader only — visually hidden but accessible */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}


/* ==========================================================================
   6. Post Grid — Standard Layout
   ========================================================================== */

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-md);
	padding: var(--space-xl) 0;
}


/* ==========================================================================
   7. Image Placeholder / Skeleton
   ========================================================================== */

.placeholder-image {
	background: var(--color-gray-light);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-gray);
	font-size: 0.9rem;
}

.skeleton {
	background: linear-gradient(90deg, var(--color-gray-light) 25%, #eee 50%, var(--color-gray-light) 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.5s ease infinite;
}

@keyframes skeleton-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.skeleton-text {
	height: 1em;
	border-radius: 4px;
	margin-bottom: var(--space-xs);
}

.skeleton-image {
	aspect-ratio: 4 / 3;
	border-radius: 8px;
}


/* ==========================================================================
   8. Focus-Visible Styles — Accessibility
   ========================================================================== */

*:focus-visible {
	outline: 2px solid var(--color-teal);
	outline-offset: 2px;
}

/* Remove default outlines only when focus-visible is supported. */
*:focus:not(:focus-visible) {
	outline: none;
}

/* Skip link becomes visible on focus. */
.skip-link:focus {
	position: fixed;
	top: 0;
	left: 0;
	background: var(--color-teal);
	color: var(--color-white);
	padding: var(--space-sm) var(--space-md);
	z-index: 99999;
	clip: auto;
	width: auto;
	height: auto;
	margin: 0;
	font-weight: var(--fw-medium);
}


/* ==========================================================================
   9. Print Styles
   ========================================================================== */

@media print {

	/* Hide non-essential elements */
	.site-header,
	.site-footer,
	.sidebar,
	.sidebar-area,
	.floating-buttons,
	.search-overlay,
	.pagination,
	.post-navigation,
	.comment-respond,
	.menu-toggle,
	.search-toggle,
	.btn-jump-recipe,
	.breadcrumbs {
		display: none !important;
	}

	/* Full-width content */
	.single-content-area,
	.content-area {
		max-width: 100% !important;
		padding: 0 !important;
	}

	/* Reset backgrounds */
	.single-hero {
		background: none !important;
		color: #000 !important;
		padding: 1rem 0 !important;
	}

	.single-hero .entry-title {
		color: #000 !important;
	}

	/* Clean typography */
	body {
		font-size: 12pt;
		line-height: 1.6;
		color: #000;
		background: #fff;
	}

	a {
		color: #000;
		text-decoration: underline;
	}

	/* Show link URLs after anchors */
	.entry-content a[href]::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: #666;
	}

	/* Avoid page breaks inside images and blockquotes */
	img,
	blockquote {
		page-break-inside: avoid;
	}

	/* Keep headings with their content */
	h2, h3, h4 {
		page-break-after: avoid;
	}
}
