/* ============================================================
   Omniverce — My Account (v1.2.0)
   The WooCommerce My Account pages restyled in the same design
   language as the vendor dashboard: page bg #F8FAFC, white cards
   (rounded 12px, gray-200 border), primary #3B7BF8 / hover
   #2D6AE0, active nav #EFF6FF + #1D4ED8, system sans, Remix
   icons (inserted by my-account.js). Scoped to body.ovd-account,
   which is only added on the WooCommerce account page. The site
   header/footer stay the theme's own.
   ============================================================ */

body.ovd-account .main-page-wrapper {
	background: #F8FAFC;
	/* Breathing room above and below the account section — Hassan
	   disabled the page title (2026-10-30), which left the content
	   flush against the header and the footer. */
	padding-top: 32px;
	padding-bottom: 40px;
}

@media (max-width: 1024px) {
	body.ovd-account .main-page-wrapper {
		padding-top: 24px;
		padding-bottom: 32px;
	}
}

/* ---------- Sidebar: ONE box (heading + menu together) ----------
   Hassan, 2026-10-30: the white card used to cover only the menu,
   with the "MY ACCOUNT" heading outside it, and a vertical line
   ran between the sidebar and content columns. Now the whole
   sidebar column is the single box, and the theme's column
   divider lines are removed. (my-account.js moves the heading
   into the column when it starts outside it.) */

body.ovd-account .woocommerce .wd-grid-col {
	border-left: 0 !important;
	border-right: 0 !important;
}

body.ovd-account .woocommerce .wd-my-account-sidebar.wd-grid-col {
	background: #FFFFFF;
	border: 1px solid #E5E7EB !important;
	border-radius: 12px;
	padding: 20px 12px;
	align-self: flex-start;
}

body.ovd-account .woocommerce .wd-my-account-sidebar::before,
body.ovd-account .woocommerce .wd-my-account-sidebar::after {
	display: none !important;
}

body.ovd-account .ovd-acct-heading {
	padding-left: 12px;
	padding-right: 12px;
	margin-bottom: 10px;
}

/* The navigation itself no longer carries a card — the column
   above is the box now. */
body.ovd-account .woocommerce-MyAccount-navigation {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
}

body.ovd-account .woocommerce-MyAccount-navigation h2,
body.ovd-account .woocommerce-MyAccount-navigation h3,
body.ovd-account .woocommerce-MyAccount-navigation h4 {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9CA3AF;
	margin: 0 0 10px;
	padding: 0 12px;
}

body.ovd-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

body.ovd-account .woocommerce-MyAccount-navigation ul li {
	margin: 0;
	padding: 0;
}

body.ovd-account .woocommerce-MyAccount-navigation ul li a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	color: #374151;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	background: transparent;
	transition: background 0.15s ease, color 0.15s ease;
}

body.ovd-account .woocommerce-MyAccount-navigation ul li a:hover {
	background: #F9FAFB;
	color: #111827;
}

body.ovd-account .woocommerce-MyAccount-navigation ul li.is-active a {
	background: #EFF6FF;
	color: #1D4ED8;
}

body.ovd-account .ovd-acct-ico {
	font-size: 18px;
	line-height: 1;
	color: #9CA3AF;
	flex-shrink: 0;
}

body.ovd-account .woocommerce-MyAccount-navigation ul li a:hover .ovd-acct-ico {
	color: #6B7280;
}

body.ovd-account .woocommerce-MyAccount-navigation ul li.is-active .ovd-acct-ico {
	color: #3B7BF8;
}

/* ---------- Content: white card ---------- */

body.ovd-account .woocommerce-MyAccount-content {
	background: #FFFFFF;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 28px;
	color: #111827;
	font-size: 15px;
	line-height: 1.6;
}

body.ovd-account .woocommerce-MyAccount-content h2,
body.ovd-account .woocommerce-MyAccount-content h3 {
	color: #111827;
	font-weight: 600;
	letter-spacing: -0.01em;
}

body.ovd-account .woocommerce-MyAccount-content a {
	color: #2D6AE0;
}

/* ---------- Dashboard link boxes (Hassan, 2026-10-29) ----------
   4 across on desktop; 2 across on tablet and mobile (one shared
   max-width: 1024px query — tablet and mobile take the same
   count). The theme builds the grid its own way (flex or grid
   depending on version), so the container is normalised to a CSS
   grid and the children's own width/flex sizing is neutralised;
   their padding and internal look stay the theme's. */

body.ovd-account .woocommerce-MyAccount-content .wd-my-account-links {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.ovd-account .woocommerce-MyAccount-content .wd-my-account-links > * {
	width: auto !important;
	max-width: none !important;
	flex: none !important;
}

@media (max-width: 1024px) {
	body.ovd-account .woocommerce-MyAccount-content .wd-my-account-links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Buttons ---------- */

body.ovd-account .woocommerce-MyAccount-content .button,
body.ovd-account .woocommerce-MyAccount-content button.button,
body.ovd-account .woocommerce .button {
	background: #3B7BF8;
	color: #FFFFFF;
	border: 0;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	box-shadow: none;
	transition: background 0.15s ease;
}

body.ovd-account .woocommerce-MyAccount-content .button:hover,
body.ovd-account .woocommerce .button:hover {
	background: #2D6AE0;
	color: #FFFFFF;
}

/* ---------- Notices ---------- */

body.ovd-account .woocommerce-info,
body.ovd-account .woocommerce-message {
	background: #EFF6FF;
	border: 1px solid #BFDBFE;
	border-radius: 10px;
	color: #1D4ED8;
	padding: 14px 18px;
}

body.ovd-account .woocommerce-message {
	background: #F0FDF4;
	border-color: #BBF7D0;
	color: #15803D;
}

body.ovd-account .woocommerce-error {
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-radius: 10px;
	color: #B91C1C;
	padding: 14px 18px;
}

body.ovd-account .woocommerce-info::before {
	color: #3B7BF8;
}

body.ovd-account .woocommerce-message::before {
	color: #16A34A;
}

body.ovd-account .woocommerce-error::before {
	color: #DC2626;
}

/* ---------- Tables (orders, returns, subscriptions…) ---------- */

body.ovd-account .woocommerce-MyAccount-content table.shop_table,
body.ovd-account .woocommerce-MyAccount-content table.woocommerce-orders-table {
	width: 100%;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: #FFFFFF;
}

body.ovd-account .woocommerce-MyAccount-content table.shop_table th {
	background: #F9FAFB;
	color: #6B7280;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 12px 16px;
	border: 0;
	border-bottom: 1px solid #E5E7EB;
	text-align: left;
}

body.ovd-account .woocommerce-MyAccount-content table.shop_table td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid #F3F4F6;
	color: #111827;
	font-size: 14px;
	vertical-align: middle;
}

body.ovd-account .woocommerce-MyAccount-content table.shop_table tr:last-child td {
	border-bottom: 0;
}

/* ---------- Forms (account details, addresses…) ---------- */

body.ovd-account .woocommerce form .form-row label {
	color: #374151;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px;
}

body.ovd-account .woocommerce form input.input-text,
body.ovd-account .woocommerce form select,
body.ovd-account .woocommerce form textarea {
	border: 1px solid #E5E7EB;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	color: #111827;
	background: #FFFFFF;
	box-shadow: none;
}

body.ovd-account .woocommerce form input.input-text:focus,
body.ovd-account .woocommerce form select:focus,
body.ovd-account .woocommerce form textarea:focus {
	border-color: #3B7BF8;
	box-shadow: 0 0 0 3px rgba(59, 123, 248, 0.15);
	outline: none;
}

body.ovd-account .woocommerce form fieldset {
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 20px;
	margin-top: 24px;
}

body.ovd-account .woocommerce form fieldset legend {
	color: #111827;
	font-size: 15px;
	font-weight: 600;
	padding: 0 8px;
}

body.ovd-account .woocommerce-MyAccount-content address {
	background: #F9FAFB;
	border: 1px solid #F3F4F6;
	border-radius: 10px;
	padding: 16px;
	font-style: normal;
	line-height: 1.65;
	color: #374151;
}

/* ---------- Mobile side drawer menu ----------
   Hassan's chosen pattern (2026-10-29, replacing the v1.2.1
   dropdown): an icon button at the end of the "MY ACCOUNT"
   heading row opens the nav list as a drawer sliding in from
   the left over a scrim — the vendor dashboard's mobile pattern.
   The button, the drawer head row and the scrim are inserted by
   my-account.js. Desktop keeps the full static list. */

/* Bulletproof pair (same pattern as the dashboard's Filters
   button): a plain display:none on the bare class loses to theme
   button rules at desktop. */
body.ovd-account .ovd-acct-menu-btn,
body.ovd-account .ovd-acct-drawer-head {
	display: none !important;
}

.ovd-acct-scrim {
	position: fixed;
	inset: 0;
	background: rgba(17, 24, 39, 0.45);
	z-index: 1250;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

/* Shared tablet + mobile spacing (max-width: 1024px is correct
   for shared queries — Hassan's breakpoint rule, 2026-10-29). */
@media (max-width: 1024px) {
	body.ovd-account .woocommerce-MyAccount-content {
		padding: 20px;
	}
}

/* The drawer itself is a MOBILE-ONLY pattern, so its query is
   max-width: 767px (768 and up is tablet: the menu sits in its
   normal sidebar column there). */
@media (max-width: 767px) {
	body.ovd-account .ovd-acct-heading {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
	}

	body.ovd-account .ovd-acct-menu-btn {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
		background: #FFFFFF;
		border: 1px solid #E5E7EB;
		border-radius: 10px;
		color: #111827;
		font-size: 20px;
		line-height: 1;
		cursor: pointer;
		flex-shrink: 0;
	}

	body.ovd-account .woocommerce .wd-my-account-sidebar.wd-grid-col {
		padding: 14px 12px;
	}

	body.ovd-account .woocommerce-MyAccount-navigation ul {
		position: fixed;
		top: 0;
		left: 0;
		height: 100dvh;
		width: min(300px, 84vw);
		margin: 0;
		padding: 12px;
		background: #FFFFFF;
		box-shadow: 0 0 60px rgba(17, 24, 39, 0.25);
		z-index: 1300;
		transform: translateX(-105%);
		transition: transform 0.28s ease;
		overflow-y: auto;
	}

	body.ovd-account .woocommerce-MyAccount-navigation.ovd-acct-open ul {
		transform: translateX(0);
	}

	body.ovd-account .ovd-acct-drawer-head {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		padding: 6px 4px 12px 12px;
		margin-bottom: 8px;
		border-bottom: 1px solid #F3F4F6;
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: #9CA3AF;
	}

	body.ovd-account .ovd-acct-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		padding: 0;
		background: transparent;
		border: 0;
		border-radius: 8px;
		color: #374151;
		font-size: 20px;
		line-height: 1;
		cursor: pointer;
	}

	body.ovd-acct-nav-open .ovd-acct-scrim {
		opacity: 1;
		pointer-events: auto;
	}

	body.ovd-acct-nav-open {
		overflow: hidden;
	}

	body.ovd-account .woocommerce-MyAccount-navigation {
		margin-bottom: 16px;
	}

	body.ovd-account .woocommerce-MyAccount-content {
		padding: 18px 16px;
	}

	body.ovd-account .woocommerce-MyAccount-content table.shop_table th,
	body.ovd-account .woocommerce-MyAccount-content table.shop_table td {
		padding: 10px 12px;
	}
}
