/**
 * Additional styles for WebCraft plans site.
 */

:root {
	--webcraft-header-height: 4rem;
}

/* Fixed top navigation */
.webcraft-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background-color: rgba(255, 255, 255, 0.97) !important;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	overflow: visible;
}

.admin-bar .webcraft-site-header {
	top: 32px;
}

/* Three-column header: logo | nav | actions */
.webcraft-header-inner {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	column-gap: 1.5rem;
	min-height: 2.75rem;
}

.webcraft-header-brand {
	justify-self: start;
	min-width: 0;
}

.webcraft-header-brand .wp-block-site-title {
	margin: 0;
	line-height: 1.2;
}

.webcraft-header-brand .wp-block-site-title a {
	text-decoration: none;
	color: #0f172a;
}

.webcraft-header-nav {
	justify-self: center;
	position: static;
	transform: none;
	min-width: 0;
}

/* Hide WooCommerce auto-hooked account icon if it still appears in nav */
.webcraft-header-nav > .wp-block-woocommerce-customer-account,
.webcraft-header-nav > .wp-block-woocommerce-mini-cart {
	display: none !important;
}

.webcraft-header-nav .wp-block-navigation {
	gap: 0.25rem;
}

.webcraft-header-nav .wp-block-navigation-item__content {
	padding: 0.35rem 0.75rem;
	font-weight: 500;
	white-space: nowrap;
}

.webcraft-header-actions {
	justify-self: end;
	display: flex !important;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	min-width: 0;
	margin: 0;
}

.webcraft-header-actions .wp-block-woocommerce-customer-account,
.webcraft-header-actions .wp-block-woocommerce-mini-cart {
	margin: 0;
}

.webcraft-header-actions .wc-block-customer-account__link {
	display: flex;
	align-items: center;
	color: #0f172a;
}

.webcraft-header-actions .wc-block-mini-cart__button {
	padding: 0.25rem;
}

/* Offset page content below fixed header */
body {
	padding-top: var(--webcraft-header-height);
}

body.admin-bar {
	padding-top: calc(var(--webcraft-header-height) + 32px);
}

/* Front page: hide default page title only */
.home .wp-block-post-title {
	display: none !important;
}

.home main {
	margin-top: 0 !important;
}

@media (max-width: 781px) {
	:root {
		--webcraft-header-height: 3.5rem;
	}

	.webcraft-header-inner {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 0.5rem;
	}

	.webcraft-header-brand {
		flex: 1 1 auto;
		min-width: 0;
	}

	.webcraft-header-nav {
		flex: 0 0 auto;
	}

	.webcraft-header-actions {
		flex: 0 0 auto;
		gap: 0.5rem;
	}

	.admin-bar .webcraft-site-header {
		top: 46px;
	}

	body.admin-bar {
		padding-top: calc(var(--webcraft-header-height) + 46px);
	}
}

.wp-block-button__link {
	font-weight: 600;
}

.has-accent-1-border-color {
	box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12);
}

/* Pricing plan cards: equal height, bottom-aligned CTAs */
.webcraft-pricing-columns,
.wp-block-columns.alignwide:has(> .wp-block-column.has-border-color) {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: var(--wp--preset--spacing--40, 2rem);
}

.webcraft-pricing-card,
.wp-block-columns.alignwide:has(> .wp-block-column.has-border-color) > .wp-block-column.has-border-color {
	display: flex;
	flex-direction: column;
	align-self: stretch;
	min-height: 100%;
}

.webcraft-pricing-card .wp-block-list,
.wp-block-columns.alignwide:has(> .wp-block-column.has-border-color) > .wp-block-column.has-border-color .wp-block-list {
	flex: 1 1 auto;
	margin-bottom: 0;
}

.webcraft-pricing-card .wp-block-buttons,
.wp-block-columns.alignwide:has(> .wp-block-column.has-border-color) > .wp-block-column.has-border-color .wp-block-buttons {
	margin-top: auto !important;
	padding-top: 1.5rem;
	width: 100%;
}

.wc-block-cart,
.woocommerce-checkout {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

.woocommerce-message,
.woocommerce-info {
	border-top-color: #2563eb;
}

.woocommerce .button.alt,
.woocommerce button.button.alt {
	background-color: #2563eb;
}

.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover {
	background-color: #1e40af;
}

.wpcf7 form {
	display: grid;
	gap: 1rem;
	max-width: 640px;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: 0.625rem 0.75rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
}

.wpcf7 input[type="submit"] {
	background: #2563eb;
	color: #fff;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
}

.wpcf7 input[type="submit"]:hover {
	background: #1e40af;
}

@media (max-width: 781px) {
	.webcraft-pricing-columns,
	.wp-block-columns.alignwide:has(> .wp-block-column.has-border-color) {
		grid-template-columns: 1fr;
	}

	.wp-block-columns.alignwide {
		flex-wrap: wrap !important;
	}
}
