/**
 * HP Blocksy Support — Core Layout Fixes
 *
 * Ensures HivePress grid, forms, buttons, pagination, and typography
 * render correctly within Blocksy's container system.
 */

/* === Container Integration === */
.ct-container .hp-row,
.ct-container-full .hp-row {
	display: flex;
	flex-wrap: wrap;
}

/* Prevent Blocksy max-width from constraining HP content */
.hp-page .entry-content,
.hp-page .ct-container {
	max-width: 100%;
}

/* === Forms === */
.hp-form .hp-field__input,
.hp-form input[type="text"],
.hp-form input[type="email"],
.hp-form input[type="password"],
.hp-form input[type="number"],
.hp-form input[type="url"],
.hp-form input[type="search"],
.hp-form textarea,
.hp-form select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--hp-color-border, #ddd);
	border-radius: var(--hp-border-radius, 3px);
	font-size: 15px;
	line-height: 1.5;
	background: var(--hp-color-surface, #fff);
	color: var(--hp-color-text, #333);
	box-sizing: border-box;
}

.hp-form .hp-field__input:focus,
.hp-form input:focus,
.hp-form textarea:focus,
.hp-form select:focus {
	border-color: var(--hp-color-primary, #4a90d9);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
	outline: none;
}

.hp-form .hp-field__label,
.hp-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
	color: var(--hp-color-text, #333);
}

/* === Buttons === */
.hp-form__button,
button.hp-button,
a.hp-button,
input.hp-button[type="submit"] {
	display: inline-block;
	padding: 10px 24px;
	border: none;
	border-radius: var(--hp-border-radius, 3px);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	background: var(--hp-color-primary, #4a90d9);
	color: #fff;
	line-height: 1.5;
	transition: background 0.2s ease;
}

.hp-form__button:hover,
button.hp-button:hover,
a.hp-button:hover {
	background: var(--hp-color-primary-hover, #357abd);
	color: #fff;
}

/* === Pagination === */
.hp-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 24px 0;
	list-style: none;
	margin: 0;
}

.hp-pagination a,
.hp-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: var(--hp-border-radius, 3px);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease;
}

.hp-pagination a {
	background: var(--hp-color-surface, #f5f5f5);
	color: var(--hp-color-text, #333);
}

.hp-pagination a:hover {
	background: var(--hp-color-primary, #4a90d9);
	color: #fff;
}

.hp-pagination .hp-pagination__item--active span,
.hp-pagination .hp-pagination__item--current {
	background: var(--hp-color-primary, #4a90d9);
	color: #fff;
	font-weight: 700;
}

/* === Modal z-index (above Blocksy sticky header) === */
.hp-modal {
	z-index: 99999;
}

/* === Notice Messages === */
.hp-notice {
	padding: 12px 16px;
	border-radius: var(--hp-border-radius, 3px);
	margin-bottom: 16px;
	font-size: 14px;
}

.hp-notice--success {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

.hp-notice--error {
	background: #ffebee;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

/* === Page Headers (prevent Blocksy duplication) === */
.hp-page .entry-header,
.hp-page .page-header {
	margin-bottom: 0;
	padding-bottom: 0;
}

/* === Prevent Blocksy lazy load from hiding HP images === */
.hp-listing__image img.ct-lazy,
.hp-vendor__image img.ct-lazy {
	opacity: 1 !important;
}

/* === Vendor avatar: force circle regardless of image aspect ratio === */
.hp-vendor--view-block .hp-vendor__image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
