/**
 * My Account Page — common widget CSS (layout for nav + content).
 *
 * The grid only engages when the account navigation is present (logged in),
 * so the login/register forms shown to logged-out visitors stay full width.
 *
 * @package captain-widgets-kit
 * @since   1.4.0
 */

.captwiki-account {
	--captwiki-acc-nav: 240px;
	--captwiki-acc-gap: 30px;
}

/* Left / right: two columns when the nav exists. */
.captwiki-account--left .woocommerce:has( .woocommerce-MyAccount-navigation ),
.captwiki-account--right .woocommerce:has( .woocommerce-MyAccount-navigation ) {
	display: grid;
	grid-template-columns: var( --captwiki-acc-nav ) 1fr;
	gap: var( --captwiki-acc-gap );
	align-items: start;
}

.captwiki-account--right .woocommerce:has( .woocommerce-MyAccount-navigation ) .woocommerce-MyAccount-navigation {
	order: 2;
}

/* Top: stack with a horizontal menu. */
.captwiki-account--top .woocommerce-MyAccount-navigation {
	margin-bottom: var( --captwiki-acc-gap );
}

.captwiki-account--top .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* Navigation reset. */
.captwiki-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.captwiki-account .woocommerce-MyAccount-navigation-link {
	list-style: none;
	margin: 0;
}

.captwiki-account .woocommerce-MyAccount-navigation-link a {
	display: block;
	padding: 12px 16px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.captwiki-account .woocommerce-MyAccount-content {
	min-width: 0;
}

/* Responsive: collapse to single column. */
@media ( max-width: 767px ) {
	.captwiki-account--left .woocommerce:has( .woocommerce-MyAccount-navigation ),
	.captwiki-account--right .woocommerce:has( .woocommerce-MyAccount-navigation ) {
		grid-template-columns: 1fr;
	}

	.captwiki-account--right .woocommerce:has( .woocommerce-MyAccount-navigation ) .woocommerce-MyAccount-navigation {
		order: 0;
	}
}

/* Editor notice. */
.captwiki-account--notice {
	display: block;
	padding: 14px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
	color: #50575e;
	text-align: center;
	font-size: 13px;
}

.captwiki-account--notice p {
	margin: 0;
}
