/* ==========================================================================
   RETAIL CUSTOMER ACCOUNTS (Phase 3) — Login/Signup pages + the restyled
   My Account area (dashboard/orders/addresses/profile/lost-password/
   reset-password all share this one file, loaded together since a visitor
   moves between them in one session).

   .mm-form-* duplicated from contact.css's copy rather than shared, same
   established trade-off documented there and in shop.css.
   ========================================================================== */

.mm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mm-form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.mm-form-group label { font-size: 12px; font-weight: 700; color: var(--mm-tm); text-transform: uppercase; letter-spacing: .5px; }
.mm-form-group input,
.mm-form-group select { padding: 11px 14px; font-size: 14px; font-family: var(--mm-fb); border: 1.5px solid var(--mm-mg); border-radius: 8px; background: #fff; color: var(--mm-t); outline: none; transition: border-color .2s; width: 100%; }
.mm-form-group input:focus,
.mm-form-group select:focus { border-color: var(--mm-r); }
.mm-form-submit { width: 100%; background: var(--mm-r); color: #fff; border: none; padding: 14px; border-radius: 8px; font-family: var(--mm-fb); font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s; text-transform: uppercase; letter-spacing: .5px; }
.mm-form-submit:hover { background: var(--mm-rd); transform: translateY(-2px); }
.mm-form-note { font-size: 11px; color: var(--mm-tm); margin: -6px 0 0; }

/* ── LOGIN / SIGNUP ── */
.mm-auth-wrap { padding: 48px 0 64px; display: flex; justify-content: center; }
.mm-auth-card { background: var(--mm-cream-3); border: 1.5px solid var(--mm-mg); border-radius: 14px; padding: 36px; width: 100%; max-width: 460px; }
.mm-auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 13px; }
.mm-auth-remember { display: flex; align-items: center; gap: 6px; color: var(--mm-tm); cursor: pointer; }
.mm-auth-remember input { accent-color: var(--mm-r); }
.mm-auth-link { color: var(--mm-r); font-weight: 700; text-decoration: none; }
.mm-auth-link:hover { text-decoration: underline; }
.mm-auth-switch { text-align: center; font-size: 13.5px; color: var(--mm-tm); margin-top: 16px; }
.mm-auth-switch a { color: var(--mm-r); font-weight: 700; text-decoration: none; margin-left: 4px; }
.mm-auth-switch a:hover { text-decoration: underline; }
.mm-auth-terms { font-size: 12.5px; color: var(--mm-tm); line-height: 1.5; }
.mm-auth-terms label { display: flex; align-items: flex-start; gap: 8px; text-transform: none; font-weight: 400; }
.mm-auth-terms input { accent-color: var(--mm-r); margin-top: 2px; }
.mm-auth-privacy-note { font-size: 12px; color: var(--mm-tm); text-align: center; margin-bottom: 14px; }
.mm-auth-confirmation { text-align: center; }
.mm-auth-confirmation-icon { font-size: 48px; margin-bottom: 12px; }

/* Show/hide password toggle */
.mm-pw-wrap { position: relative; }
.mm-pw-wrap input { padding-right: 42px; }
.mm-pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 16px; cursor: pointer; opacity: .5; padding: 6px; line-height: 1; }
.mm-pw-toggle:hover { opacity: 1; }
.mm-pw-toggle.is-visible { opacity: 1; }

/* Password strength meter — text/bar driven by WordPress core's own
   password-strength-meter.js (registered handle "password-strength-meter"),
   not a custom implementation. See assets/js/account.js for the wiring. */
.mm-pw-strength { margin-top: 6px; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 6px; display: none; }
.mm-pw-strength.is-visible { display: block; }
.mm-pw-strength[data-strength="short"] { background: #FBE8E8; color: var(--mm-rd); }
.mm-pw-strength[data-strength="bad"] { background: #FBE8E8; color: var(--mm-rd); }
.mm-pw-strength[data-strength="good"] { background: #FFF3D6; color: #8A6300; }
.mm-pw-strength[data-strength="strong"] { background: #E5F3EA; color: #1F7A3F; }
.mm-pw-strength[data-strength="mismatch"] { background: #FBE8E8; color: var(--mm-rd); }

/* ── MY ACCOUNT: sidebar layout ── */
.mm-account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; padding: 32px 0 56px; }
.mm-account-sidebar { background: var(--mm-cream-3); border: 1.5px solid var(--mm-mg); border-radius: 12px; padding: 12px; position: sticky; top: calc(var(--mm-hh) + 16px); }
.mm-account-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mm-account-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; font-family: var(--mm-fb); font-size: 14px; font-weight: 600; color: var(--mm-t); text-decoration: none; }
.mm-account-nav a:hover { background: var(--mm-cream-2); }
.mm-account-nav .is-active a { background: var(--mm-r); color: #fff; }
.mm-account-nav-ic { font-size: 16px; width: 20px; text-align: center; }
.mm-account-main { min-width: 0; }

/* Dashboard */
.mm-account-welcome h2 { font-family: var(--mm-fh); font-size: 28px; font-weight: 800; color: var(--mm-t); text-transform: uppercase; margin-bottom: 8px; }
.mm-account-welcome p { font-size: 14px; color: var(--mm-tm); line-height: 1.6; margin-bottom: 24px; }
.mm-account-welcome a { color: var(--mm-r); font-weight: 700; }
.mm-account-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mm-account-card { background: var(--mm-cream-3); border: 1.5px solid var(--mm-mg); border-radius: 12px; padding: 20px; }
.mm-account-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mm-account-card-hd h3 { font-family: var(--mm-fh); font-size: 17px; font-weight: 800; text-transform: uppercase; color: var(--mm-t); }
.mm-account-card-link { font-size: 12px; font-weight: 700; color: var(--mm-r); text-decoration: none; }
.mm-account-order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mm-account-order-list a { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; background: #fff; border: 1px solid var(--mm-mg); text-decoration: none; font-size: 12.5px; }
.mm-account-order-num { font-weight: 800; color: var(--mm-t); }
.mm-account-order-date { color: var(--mm-tm); }
.mm-account-order-status { font-weight: 700; padding: 3px 8px; border-radius: 4px; background: var(--mm-cream-2); color: var(--mm-t); font-size: 10.5px; text-transform: uppercase; }
.mm-account-order-total { font-weight: 800; color: var(--mm-r); }
.mm-account-empty { font-size: 13px; color: var(--mm-tm); }
.mm-account-empty a { color: var(--mm-r); font-weight: 700; }
.mm-account-address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 13px; }
.mm-account-address-grid strong { display: block; font-size: 11px; text-transform: uppercase; color: var(--mm-tm); margin-bottom: 6px; }
.mm-account-address-grid address { font-style: normal; color: var(--mm-t); line-height: 1.6; }

.mm-account-deleted-notice { background: var(--mm-cream-3); border: 1.5px solid var(--mm-mg); border-left: 4px solid #1F7A3F; border-radius: 8px; padding: 14px 18px; margin: 16px 0; font-size: 14px; }

/* Wholesale status notice on the dashboard (Phase 5) */
.mm-account-wholesale-notice { border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 13.5px; font-weight: 600; }
.mm-account-wholesale-notice.mm-wholesale-status-pending { background: #FFF3D6; color: #8A6300; }
.mm-account-wholesale-notice.mm-wholesale-status-approved { background: #E5F3EA; color: #1F7A3F; }
.mm-account-wholesale-notice.mm-wholesale-status-rejected { background: #FBE8E8; color: var(--mm-rd); }

/* Shared section heading (Profile, Orders, Addresses, Order Detail) */
.mm-account-section-title { font-family: var(--mm-fh); font-size: 24px; font-weight: 800; text-transform: uppercase; color: var(--mm-t); margin-bottom: 4px; }
.mm-account-section-sub { font-size: 13px; color: var(--mm-tm); margin-bottom: 20px; }

/* Order status badge colors, shared by dashboard/orders/order-detail */
.mm-status-pending, .mm-status-on-hold { background: #FFF3D6; color: #8A6300; }
.mm-status-processing { background: #E0EEFB; color: #1A5FA3; }
.mm-status-completed { background: #E5F3EA; color: #1F7A3F; }
.mm-status-cancelled, .mm-status-failed { background: #FBE8E8; color: var(--mm-rd); }
.mm-status-refunded { background: var(--mm-cream-2); color: var(--mm-tm); }

/* Orders list */
.mm-orders-list { display: flex; flex-direction: column; gap: 14px; }
.mm-order-card { background: var(--mm-cream-3); border: 1.5px solid var(--mm-mg); border-radius: 12px; padding: 18px 20px; }
.mm-order-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mm-order-num { font-family: var(--mm-fh); font-size: 17px; font-weight: 800; color: var(--mm-t); }
.mm-order-date { font-size: 12px; color: var(--mm-tm); margin-left: 10px; }
.mm-order-status { font-weight: 700; padding: 4px 10px; border-radius: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.mm-order-card-items { font-size: 13px; color: var(--mm-tm); margin-bottom: 12px; }
.mm-order-card-ft { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--mm-mg); padding-top: 12px; }
.mm-order-total { font-family: var(--mm-fh); font-size: 16px; font-weight: 800; color: var(--mm-r); }
.mm-order-view-btn { background: var(--mm-t); color: #fff; padding: 9px 18px; border-radius: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.mm-order-view-btn:hover { background: var(--mm-r); color: #fff; }
.mm-orders-pagination { margin-top: 20px; }
.mm-orders-pagination ul.page-numbers { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; }
.mm-orders-pagination .page-numbers a,
.mm-orders-pagination .page-numbers span { display: flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border: 1.5px solid var(--mm-mg); border-radius: 6px; font-size: 13px; text-decoration: none; color: var(--mm-t); }
.mm-orders-pagination .page-numbers.current { background: var(--mm-r); border-color: var(--mm-r); color: #fff; }

.mm-account-empty-state { text-align: center; padding: 40px 20px; background: var(--mm-cream-3); border: 1.5px dashed var(--mm-mg); border-radius: 12px; }
.mm-account-empty-state p { color: var(--mm-tm); margin-bottom: 16px; }
.mm-account-empty-cta { display: inline-block; background: var(--mm-r); color: #fff; padding: 12px 28px; border-radius: 8px; font-family: var(--mm-fb); font-size: 13px; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.mm-account-empty-cta:hover { background: var(--mm-rd); color: #fff; }

/* Single order detail */
.mm-order-detail-hd { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.mm-order-detail-date { font-size: 13px; color: var(--mm-tm); }
.mm-order-back-link { display: inline-block; font-size: 13px; font-weight: 700; color: var(--mm-r); text-decoration: none; margin-bottom: 20px; }
.mm-order-back-link:hover { text-decoration: underline; }
.mm-order-detail-body { background: var(--mm-cream-3); border: 1.5px solid var(--mm-mg); border-radius: 12px; padding: 24px; }
.mm-order-detail-body table.shop_table { margin-bottom: 20px; }
/* WooCommerce's own order-details/customer-details tables (do_action('woocommerce_view_order')) aren't
   built by this theme and don't collapse to a single column on narrow screens — scope the scroll to just
   the table itself, not the whole card, so totals/addresses below it still lay out normally. */
.mm-order-detail-body table.shop_table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mm-order-detail-body table.shop_table tbody,
.mm-order-detail-body table.shop_table thead,
.mm-order-detail-body table.shop_table tfoot { display: table; width: 100%; }

/* Address book */
.mm-address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mm-address-card { background: var(--mm-cream-3); border: 1.5px solid var(--mm-mg); border-radius: 12px; padding: 20px; }
.mm-address-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mm-address-card-hd h3 { font-family: var(--mm-fh); font-size: 16px; font-weight: 800; text-transform: uppercase; color: var(--mm-t); }
.mm-address-edit-link { font-size: 12px; font-weight: 700; color: var(--mm-r); text-decoration: none; }
.mm-address-edit-link:hover { text-decoration: underline; }
.mm-address-card address { font-style: normal; font-size: 13.5px; color: var(--mm-t); line-height: 1.7; }
.mm-address-empty { font-size: 13px; color: var(--mm-tm); }
.mm-account-password-fieldset { border: none; padding: 16px 0 0; margin: 8px 0 20px; border-top: 1.5px solid var(--mm-mg); }
.mm-account-password-fieldset legend { font-family: var(--mm-fh); font-size: 15px; font-weight: 800; text-transform: uppercase; color: var(--mm-t); padding: 0; margin-bottom: 4px; }

/* Delete-my-account (Profile page addition) */
.mm-account-danger-zone { margin-top: 32px; padding-top: 24px; border-top: 1.5px solid var(--mm-mg); }
.mm-account-danger-zone h3 { font-family: var(--mm-fh); font-size: 16px; font-weight: 800; text-transform: uppercase; color: var(--mm-rd); margin-bottom: 8px; }
.mm-account-danger-zone p { font-size: 12.5px; color: var(--mm-tm); margin-bottom: 12px; line-height: 1.6; }
.mm-account-delete-btn { background: none; border: 1.5px solid var(--mm-rd); color: var(--mm-rd); padding: 10px 18px; border-radius: 8px; font-family: var(--mm-fb); font-size: 12.5px; font-weight: 700; cursor: pointer; text-transform: uppercase; }
.mm-account-delete-btn:hover { background: var(--mm-rd); color: #fff; }
.mm-account-delete-confirm { display: none; margin-top: 12px; }
.mm-account-delete-confirm.is-visible { display: block; }

/* ── HEADER ACCOUNT DROPDOWN ── */
.mm-acct-dd { position: relative; }
.mm-acct-dd-trigger { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 500; cursor: pointer; font-family: var(--mm-fb); }
.mm-acct-dd-trigger:hover,
.mm-acct-dd.is-open .mm-acct-dd-trigger { background: rgba(255, 255, 255, .15); }
.mm-acct-dd-menu { position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1.5px solid var(--mm-mg); border-radius: 10px; box-shadow: var(--mm-sh-lg); list-style: none; margin: 0; padding: 8px; min-width: 180px; z-index: 50; }
.mm-acct-dd-menu[hidden] { display: none; }
.mm-acct-dd-menu li a { display: block; padding: 9px 12px; border-radius: 6px; font-family: var(--mm-fb); font-size: 13px; font-weight: 600; color: var(--mm-t); text-decoration: none; }
.mm-acct-dd-menu li a:hover { background: var(--mm-cream-2); color: var(--mm-r); }

@media (max-width: 900px) {
	.mm-account-layout { grid-template-columns: 1fr; }
	.mm-account-sidebar { position: static; }
	.mm-account-cards { grid-template-columns: 1fr; }
	.mm-account-address-grid { grid-template-columns: 1fr; }
	.mm-address-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.mm-auth-card { padding: 24px; }
	.mm-form-row { grid-template-columns: 1fr; }
	.mm-account-order-list a { grid-template-columns: 1fr 1fr; }
	.mm-order-card-hd { flex-direction: column; align-items: flex-start; gap: 8px; }
	.mm-order-card-ft { flex-direction: column; align-items: flex-start; gap: 10px; }
	.mm-order-view-btn { width: 100%; text-align: center; }
	.mm-order-detail-hd { flex-direction: column; gap: 10px; }
	.mm-order-detail-body { padding: 16px; }
}
