/**
 * eup-account — My Account, login and header-dropdown presentation.
 *
 * Tranche 5. Everything here replaces markup-level styling that the parent theme carried either
 * as `style="…"` attributes inside templates or as an inline `<style>` block:
 *
 *   X-176  woocommerce/myaccount/orders-custom.php:4, 14, 42-126 (attributes) and 131-187 (block)
 *   X-177  woocommerce/myaccount/form-login.php:66, 73, 103-134 (attributes)
 *   X-178  woocommerce/myaccount/form-login-lightbox-left-panel.php:3, 27, 38, 42, 46
 *   X-185  template-parts/header/partials/element-account.php:104-158
 *   X-034  functions.php:751-773 (the greeting the parent injected with a footer script)
 *
 * Enqueued as `eup-account` by `eupepsia_child_enqueue_assets()` in inc/enqueue.php, which picks
 * this file up by name on `is_account_page()`. The header dropdown and the login lightbox render
 * on every template, so those two blocks are the one part of this file that is scoped by class
 * alone; they are cheap, and moving them to `eup-base` belongs with the X-169 stylesheet work.
 *
 * `account-footer.css` does not exist; the account footer tranche shipped script only. Merge this
 * file with `eup-account-footer` and `eup-account-templates` when the handles are merged.
 */

/* -------------------------------------------------------------------------
 * X-034 — the account greeting, now server-rendered by inc/account-display.php.
 * ---------------------------------------------------------------------- */

.eup-account-greeting {
	margin-bottom: 1.5em;
}

.eup-account-greeting .eup-account-greeting__text {
	color: var(--eup3-accent-text, var(--eup-brand, #00ccb8));
	display: block;
	font-size: 2.2em;
	font-weight: normal;
	line-height: 1.2;
}

/* -------------------------------------------------------------------------
 * X-176 — the orders card list.
 * The parent's brand colour was the literal #00ccb8 in six places in that template.
 * ---------------------------------------------------------------------- */

.eup-orders .custom-order-item-container {
	background: #fff;
	border: 1px solid var(--eup-rule, #eee);
	margin-bottom: 30px;
	padding: 20px;
}

.custom-order-header {
	align-items: center;
	display: flex;
	gap: 1em;
	justify-content: space-between;
	margin-bottom: 15px;
}

.custom-order-number {
	color: var(--eup3-accent-text, var(--eup-brand, #00ccb8));
	font-size: 1.125rem;
	margin: 0;
}

.custom-order-date {
	color: var(--eup-muted, #777);
	font-size: 0.9em;
	margin: 5px 0 0;
}

.custom-order-line {
	border-top: 1px solid var(--eup-rule, #eee);
	display: flex;
	gap: 15px;
	margin-top: 20px;
	padding-top: 20px;
}

.custom-order-line__media {
	flex: 0 0 80px;
}

.custom-order-line__media img {
	display: block;
	height: auto;
	width: 80px;
}

.custom-order-line__placeholder {
	background: #f5f5f5;
	display: block;
	height: 80px;
	width: 80px;
}

.custom-order-line__body {
	min-width: 0;
}

.custom-order-line__name {
	display: block;
}

.custom-order-line__status {
	color: var(--eup-muted, #777);
	display: block;
	font-size: 0.85em;
}

/* The parent wrote style="color:red;" here. `red` against #fff is 4.0:1 and fails WCAG AA for
   body text, so the cancelled state uses a darker red and is not carried by colour alone — the
   row is also struck through. */
.custom-order-line__status-value.is-cancelled {
	color: #b3261e;
	font-weight: 600;
}

.custom-order-line.is-cancelled .custom-order-line__name {
	text-decoration: line-through;
}

.custom-order-actions {
	border-top: 1px solid var(--eup-rule, #eee);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 20px;
	padding-top: 15px;
}

/* -------------------------------------------------------------------------
 * X-176 — the cancellation confirmation dialog, previously an inline <style> block.
 * The markup is now built by src/js/account-templates.js, so these rules only ever apply to
 * elements that script created.
 * ---------------------------------------------------------------------- */

.custom-confirm-overlay {
	align-items: center;
	background: rgba(0, 0, 0, 0.5);
	bottom: 0;
	display: none;
	justify-content: center;
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 9999;
}

.custom-confirm-overlay.is-open {
	display: flex;
}

.custom-confirm-box {
	animation: eup-confirm-in 0.3s ease;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	max-width: calc(100vw - 2rem);
	padding: 25px;
	text-align: center;
	width: 320px;
}

.custom-confirm-box h2 {
	font-size: 1.125rem;
	margin: 0 0 10px;
}

.custom-confirm-actions {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-top: 20px;
}

.custom-confirm-actions button {
	border: 0;
	border-radius: 5px;
	cursor: pointer;
	padding: 8px 15px;
}

.custom-confirm-actions .confirm-btn {
	background: var(--eup-brand, #00ccb8);
	color: #fff;
}

.custom-confirm-actions .cancel-btn {
	background: #ddd;
}

/* Namespaced: the parent called this keyframe `fadeIn`, a name three plugins on this site also
   define. */
@keyframes eup-confirm-in {
	from {
		opacity: 0;
		transform: scale(0.9);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-confirm-box {
		animation: none;
	}
}

/* -------------------------------------------------------------------------
 * X-177 / X-178 — login and registration forms.
 * ---------------------------------------------------------------------- */

.custom-login-box .login-title {
	margin-top: 0;
}

.custom-login-box .login-links.forgot8 {
	align-items: baseline;
	display: flex;
	gap: 0.4em;
}

.custom-login-box .login-links.forgot8 p {
	color: var(--eup-muted, #777);
	margin: 0;
}

.custom-login-box .form-row--submit {
	padding-bottom: 10px;
}

.custom-login-box .or-divider {
	border-top: 1px solid var(--eup-rule, #eee);
	margin: 1em 0;
	text-align: left;
}

.custom-login-box .form-row.bb {
	border-bottom: 1px solid var(--eup-rule, #eee);
	margin: 10px 0;
	padding: 10px 0;
}

.custom-login-box .new0 {
	color: var(--eup-muted, #777);
	margin-right: 0.35em;
}

/* The parent put a Font Awesome arrow glyph (`fa-solid fa-arrow-right-long`) inside five of
   these links. Font Awesome is dequeued (X-035 / PARENT-THEME-PATCHES.md C-01), so the glyph is
   drawn here instead of rendering an empty <i>. aria-hidden is implicit: generated content is
   not exposed as text by current screen readers when it is decorative punctuation. */
.eup-arrow-link::after {
	content: " \2192";
	speak: never;
}

/* X-177 — themes/flatsome/woocommerce/myaccount/form-login.php:103-109. The register form's
   first/last name pair was laid out with inline width:48%/display:inline-block. */
.account-register-inner .form-row-first,
.account-register-inner .form-row-last {
	display: inline-block;
	width: 48%;
}

.account-register-inner .form-row-first {
	margin-right: 4%;
}

/* X-177 — the two field hints, previously style="font-size:12px; color:#555;". */
.woocommerce-email-info,
.woocommerce-password-info {
	color: #555;
	display: block;
	font-size: 12px;
}

/* -------------------------------------------------------------------------
 * X-185 — the header account dropdown.
 * ---------------------------------------------------------------------- */

.nav-dropdown li.customer-name {
	border-bottom: 1px solid var(--eup-rule, #eee);
	font-weight: 600;
	padding-bottom: 0.5em;
}

.nav-dropdown li.logout-with-border {
	border-top: 1px solid var(--eup-rule, #eee);
	padding-top: 0.5em;
}

.nav-dropdown .woocommerce-MyAccount-navigation-link a {
	align-items: center;
	display: flex;
	gap: 0.5em;
}
