/* VibeHaven — Shared commerce styles */

body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account {
	--vh-woo-max: min(960px, 100%);
}

body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce,
body.woocommerce-account .woocommerce {
	max-width: var(--vh-woo-max);
	margin: 0 auto;
	padding: 28px 16px 64px;
}

/* Page heading (when theme/Woo outputs h1) */
body.woocommerce-cart .entry-title,
body.woocommerce-checkout .entry-title,
body.woocommerce-account .entry-title,
body.woocommerce-cart .vh-entry__title,
body.woocommerce-checkout .vh-entry__title,
body.woocommerce-account .vh-entry__title {
	margin: 0 0 1.25rem;
	color: var(--vh-text);
	font-size: clamp(1.5rem, 4vw, 1.85rem);
	font-weight: 900;
}

/* Notices */
.woocommerce-notices-wrapper {
	max-width: var(--vh-woo-max);
	margin: 0 auto;
	padding: 0 16px;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-NoticeGroup .woocommerce-error,
.woocommerce-NoticeGroup .woocommerce-message,
.woocommerce-NoticeGroup .woocommerce-info {
	margin: 0 0 16px !important;
	padding: 14px 16px !important;
	border: 1px solid var(--vh-line-soft) !important;
	border-radius: 12px !important;
	background: var(--vh-surface) !important;
	color: var(--vh-text) !important;
	box-shadow: none !important;
	list-style: none !important;
}

.woocommerce-message {
	border-color: rgba(255, 0, 117, 0.35) !important;
	background: linear-gradient(180deg, rgba(255, 0, 117, 0.12), var(--vh-surface)) !important;
}

.woocommerce-error {
	border-color: rgba(255, 80, 80, 0.45) !important;
	background: linear-gradient(180deg, rgba(255, 80, 80, 0.1), var(--vh-surface)) !important;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none !important;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
	color: var(--vh-pink);
	font-weight: 700;
}

/* Buttons */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce #place_order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 20px;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--vh-pink) !important;
	color: #fff !important;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background 0.15s ease, transform 0.15s ease;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover {
	background: #e6006a !important;
	color: #fff !important;
}

.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce #place_order {
	width: 100%;
	min-height: 52px;
	font-size: 1.05rem;
}

.woocommerce a.button.wc-backward,
.woocommerce .button[name="update_cart"],
.woocommerce .button[name="apply_coupon"] {
	background: transparent !important;
	border: 1px solid var(--vh-line) !important;
	color: var(--vh-text) !important;
}

.woocommerce a.button.wc-backward:hover,
.woocommerce .button[name="update_cart"]:hover,
.woocommerce .button[name="apply_coupon"]:hover {
	border-color: var(--vh-pink) !important;
	color: var(--vh-pink) !important;
	background: rgba(255, 0, 117, 0.08) !important;
}

.woocommerce .button:disabled,
.woocommerce .button.disabled,
.woocommerce button.button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Forms */
.woocommerce form .form-row {
	margin: 0 0 14px;
	padding: 0;
}

.woocommerce form .form-row label {
	display: block;
	margin-bottom: 6px;
	color: var(--vh-muted);
	font-size: 0.9rem;
	font-weight: 600;
}

.woocommerce form .form-row label .required {
	color: var(--vh-pink);
	text-decoration: none;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce form .form-row .select2-selection,
.woocommerce .select2-container--default .select2-selection--single,
.woocommerce-page .select2-container--default .select2-selection--single {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px !important;
	border: 1px solid var(--vh-line-soft) !important;
	border-radius: 10px !important;
	background: #0d121a !important;
	color: var(--vh-text) !important;
	box-shadow: none !important;
	outline: none;
}

.woocommerce form .form-row textarea {
	min-height: 110px;
	resize: vertical;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce .select2-container--default.select2-container--focus .select2-selection--single {
	border-color: var(--vh-pink) !important;
}

.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--vh-text) !important;
	line-height: 44px !important;
	padding-left: 0 !important;
}

.woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 44px !important;
}

.select2-dropdown {
	border: 1px solid var(--vh-line-soft) !important;
	background: #0d121a !important;
	color: var(--vh-text) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
	background: var(--vh-pink) !important;
	color: #fff !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
	border: 1px solid var(--vh-line-soft) !important;
	background: var(--vh-bg) !important;
	color: var(--vh-text) !important;
}

/* Tables shared by cart and account orders. */
.woocommerce table.shop_table {
	width: 100%;
	margin: 0 0 20px;
	border: 1px solid var(--vh-line-soft);
	border-radius: 16px;
	border-collapse: separate;
	border-spacing: 0;
	background: linear-gradient(180deg, var(--vh-surface) 0%, var(--vh-bg) 100%);
	overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--vh-line-soft);
	color: var(--vh-text);
	background: transparent;
	vertical-align: middle;
}

.woocommerce table.shop_table thead th {
	color: var(--vh-muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.02);
}

.woocommerce table.shop_table tr:last-child td {
	border-bottom: 0;
}

.woocommerce-privacy-policy-text,
.woocommerce-terms-and-conditions-wrapper {
	color: var(--vh-muted);
	font-size: 0.9rem;
}

.woocommerce-privacy-policy-text a {
	color: var(--vh-pink);
}

/* Responsive commerce tables */
@media (max-width: 768px) {
	.woocommerce table.shop_table_responsive thead {
		display: none;
	}

	.woocommerce table.shop_table_responsive tr {
		display: block;
		margin: 0;
		padding: 14px 12px;
		border-bottom: 1px solid var(--vh-line-soft);
	}

	.woocommerce table.shop_table_responsive tr:last-child {
		border-bottom: 0;
	}

	.woocommerce table.shop_table_responsive td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		width: 100% !important;
		padding: 8px 4px !important;
		border: 0 !important;
		text-align: right;
	}

	.woocommerce table.shop_table_responsive td::before {
		content: attr(data-title);
		float: none;
		color: var(--vh-muted);
		font-weight: 700;
		text-align: left;
	}

	.woocommerce table.shop_table_responsive td.product-thumbnail,
	.woocommerce table.shop_table_responsive td.product-remove {
		justify-content: flex-start;
	}

	.woocommerce table.shop_table_responsive td.product-thumbnail::before,
	.woocommerce table.shop_table_responsive td.product-remove::before,
	.woocommerce table.shop_table_responsive td.actions::before {
		display: none;
	}

	.woocommerce table.shop_table_responsive td.actions {
		display: block;
		text-align: left;
	}
}
