/**
 * Puente — Main CSS
 *
 * Component styles that are shared across all templates.
 * Design tokens live in style.css (the theme stylesheet).
 *
 * @package Puente
 */

/* ── Sticky header scroll state ───────────────────────────────────────────── */
.site-header.is-scrolled {
	box-shadow: var(--shadow-md);
}

/* ── Skip link ────────────────────────────────────────────────────────────── */
.skip-link:focus {
	position: fixed;
	top: var(--space-md);
	left: var(--space-md);
	z-index: 9999;
	background: var(--color-primary);
	color: #fff;
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-md);
	font-weight: 600;
	text-decoration: none;
	clip: auto;
	width: auto;
	height: auto;
	overflow: visible;
	white-space: normal;
}

/* ── Search form ─────────────────────────────────────────────────────────── */
.search-form {
	display: flex;
	gap: var(--space-sm);
	max-width: 480px;
	margin-inline: auto;
}

.search-form .search-field {
	flex: 1;
	padding: 0.625rem var(--space-lg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-size: var(--text-sm);
	background: var(--color-bg);
	color: var(--color-text);
	outline: none;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-form .search-field:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.search-form .search-submit {
	padding: 0.625rem var(--space-lg);
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: var(--text-sm);
	cursor: pointer;
	transition: background-color var(--transition-fast);
}

.search-form .search-submit:hover {
	background: var(--color-primary-dark);
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb a {
	color: var(--color-text-muted);
	text-decoration: none;
}

.breadcrumb a:hover {
	color: var(--color-primary);
}

/* ── WordPress core: captions, gallery ─────────────────────────────────── */
.wp-caption {
	max-width: 100%;
	margin-bottom: var(--space-md);
}

.wp-caption-text {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	text-align: center;
	margin-top: var(--space-xs);
}

.gallery {
	display: grid;
	gap: var(--space-sm);
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item img  { width: 100%; height: auto; border-radius: var(--radius-sm); }

/* ── WordPress widgets ────────────────────────────────────────────────────── */
.widget {
	margin-bottom: var(--space-2xl);
}

.widget__title {
	font-size: var(--text-base);
	font-weight: 700;
	margin-bottom: var(--space-md);
	padding-bottom: var(--space-sm);
	border-bottom: 2px solid var(--color-primary);
	display: inline-block;
}

.widget ul { padding-left: 0; list-style: none; }
.widget ul li { padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
.widget ul li:last-child { border-bottom: none; }
.widget a { color: var(--color-text); text-decoration: none; }
.widget a:hover { color: var(--color-primary); }

/* ── Comments ─────────────────────────────────────────────────────────────── */
.comments-title {
	font-size: var(--text-2xl);
	margin-bottom: var(--space-xl);
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 var(--space-2xl);
}

.comment-body {
	padding: var(--space-xl);
	background: var(--color-surface);
	border-radius: var(--radius-xl);
	margin-bottom: var(--space-md);
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	margin-bottom: var(--space-md);
}

.comment-author .fn { font-weight: 700; font-size: var(--text-sm); }
.comment-metadata { font-size: var(--text-xs); color: var(--color-text-muted); }
.comment-content p { font-size: var(--text-sm); margin: 0; }

.reply a {
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--color-primary);
}

/* ── Comment form ─────────────────────────────────────────────────────────── */
.comment-reply-title {
	font-size: var(--text-2xl);
	margin-bottom: var(--space-xl);
}

.comment-form label {
	display: block;
	font-size: var(--text-sm);
	font-weight: 600;
	margin-bottom: var(--space-xs);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.625rem var(--space-md);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-size: var(--text-sm);
	font-family: var(--font-sans);
	background: var(--color-bg);
	color: var(--color-text);
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.comment-form textarea {
	min-height: 160px;
	resize: vertical;
}

.comment-form-comment,
.comment-form p {
	margin-bottom: var(--space-lg);
}

.comment-form .submit {
	background: var(--color-primary);
	color: #fff;
	border: none;
	padding: 0.75rem var(--space-2xl);
	border-radius: var(--radius-md);
	font-size: var(--text-sm);
	font-weight: 600;
	cursor: pointer;
	transition: background-color var(--transition-fast);
}

.comment-form .submit:hover {
	background: var(--color-primary-dark);
}

/* ── User placeholder indicators (visible until plugin is active) ─────────── */
.user-placeholder {
	opacity: 0.5;
	font-style: italic;
}

/* Plugin removes this class once real data is loaded */
.user-placeholder[data-loaded="true"] {
	opacity: 1;
	font-style: normal;
}
