/* MG Advanced Account base styles scoped */
body.mg-acc-active { --brand:#ad0000; }
body.mg-acc-active .mg-acc-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:18px;position:relative}
body.mg-acc-active .mg-acc-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));}
body.mg-acc-active .mg-acc-metric{display:flex;flex-direction:column;gap:6px;min-height:120px;overflow:hidden;border:1px solid #e5e7eb;border-radius:14px;padding:14px;background:#fff;transition:.25s}
body.mg-acc-active .mg-acc-metric:hover{box-shadow:0 8px 24px -8px rgba(0,0,0,.15)}
body.mg-acc-active .mg-acc-ic{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fff,#f3f4f6);font-size:18px;color:var(--brand);font-weight:600;box-shadow:0 4px 10px -2px rgba(0,0,0,.1)}
body.mg-acc-active .mg-acc-label{font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#6b7280}
body.mg-acc-active .mg-acc-value{font-size:26px;font-weight:700;line-height:1.1;color:#111827;display:flex;align-items:center;gap:6px}
body.mg-acc-active .mg-trend{font-size:10px;font-weight:600;border-radius:999px;padding:2px 6px;display:inline-flex;align-items:center;gap:4px}
body.mg-acc-active .mg-trend.up{background:#d1fae5;color:#047857}
body.mg-acc-active .mg-trend.down{background:#fee2e2;color:#dc2626}
/* skeleton */
body.mg-acc-active .mg-skel .mg-acc-ic,body.mg-acc-active .mg-skel .mg-acc-value span[data-value]{background:linear-gradient(90deg,#f3f4f6,#e5e7eb,#f3f4f6);background-size:200% 100%;animation:mg-s 1.2s linear infinite;color:transparent}
@keyframes mg-s{0%{background-position:0 0}100%{background-position:200% 0}}

/* recent orders */
body.mg-acc-active .mg-recent-wrapper{border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;background:#fff}
body.mg-acc-active .mg-recent-wrapper ul li{transition:background .25s}
body.mg-acc-active .mg-recent-wrapper ul li:hover{background:rgba(0,0,0,.03)}

/* recommendations */
body.mg-acc-active .mg-recs-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));}
body.mg-acc-active .mg-rec-card{position:relative;border:1px solid #e5e7eb;border-radius:16px;background:#fff;overflow:hidden;display:flex;flex-direction:column;min-height:210px}
body.mg-acc-active .mg-rec-card a{text-decoration:none}
body.mg-acc-active .mg-rec-img{aspect-ratio:1/1;width:100%;background:linear-gradient(135deg,#f3f4f6,#e5e7eb)}
body.mg-acc-active .mg-rec-body{padding:10px;display:flex;flex-direction:column;gap:6px}
body.mg-acc-active .mg-rec-title{font-size:10px;line-height:1.3;color:#111827;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.mg-acc-active .mg-rec-price{font-size:9px;font-weight:500;color:var(--brand);text-align: left}
body.mg-acc-active .mg-rec-card.mg-skel .mg-rec-title,body.mg-acc-active .mg-rec-card.mg-skel .mg-rec-price{height:10px;background:linear-gradient(90deg,#f3f4f6,#e5e7eb,#f3f4f6);background-size:200% 100%;animation:mg-s 1.2s linear infinite;border-radius:4px;color:transparent}

/* utilities */
body.mg-acc-active .mg-divider{height:2px;width:120px;background:linear-gradient(to left,var(--brand),rgba(173,0,0,.2));border-radius:2px}
/* Force-hide default WooCommerce navigation if theme outputs it */
body.mg-acc-active nav.woocommerce-MyAccount-navigation, body.mg-acc-active .woocommerce-MyAccount-navigation {display:none !important;}
/* If theme adds columns for my account (legacy), collapse them */
body.mg-acc-active .woocommerce-account .woocommerce-MyAccount-content{width:100% !important;float:none !important;margin:0 !important;padding:0 !important;border:none !important}
body.mg-acc-active .woocommerce-account .woocommerce {display:block !important}
body.mg-acc-active .woocommerce-account .woocommerce-MyAccount-navigation{display:none !important}
/* layout tweaks */
/* Narrow container width only for our component; avoid touching generic .container */
body.mg-acc-active .mg-adv-account-container{max-width:1280px;margin-left:auto;margin-right:auto}
/* Removed rule that targeted generic .container to avoid Flatsome conflicts */
/* layout: rely on Flatsome grid; just enhance side & sticky */
body.mg-acc-active .mg-acc-aside{margin-bottom:1.5rem}
@media (min-width:1024px){body.mg-acc-active .mg-acc-aside{margin:0;position:sticky;top:40px;align-self:start;padding-top:0}}
/* If sidebar taller than viewport, disable sticky to allow normal page scroll */
@media (min-width:1024px){body.mg-acc-active.mg-acc-no-sticky .mg-acc-aside{position:static!important;top:auto!important}}
/* remove theme left border inside Flatsome column */
body.mg-acc-active .mg-acc-aside.col-border{border:none !important;padding-left:0 !important}
/* vertical align top tweak */
body.mg-acc-active #mg-acc-row{align-items:start}
/* mobile trigger visibility */
body.mg-acc-active .mg-acc-mobile-trigger{display:flex}
@media (min-width:850px){body.mg-acc-active .mg-acc-mobile-trigger{display:none}}
/* Advanced sidebar */
body.mg-acc-active .mg-acc-sidebar{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:20px;position:relative;overflow:hidden}
body.mg-acc-active .mg-acc-aside .mg-acc-sidebar{margin-top:0}
/* Sidebar should not scroll on desktop; rely on page scroll with sticky aside */
body.mg-acc-active .mg-acc-usercard{display:grid;grid-template-columns:64px 1fr auto;gap:14px;align-items:center;position:relative}
body.mg-acc-active .mg-acc-avatar-wrapper{position:relative}
body.mg-acc-active .mg-acc-avatar-img{width:64px;height:64px;border-radius:18px;object-fit:cover;box-shadow:0 4px 12px -4px rgba(0,0,0,.2)}
body.mg-acc-active .mg-acc-avatar-edit{position:absolute;bottom:-6px;left:-6px;background:var(--brand);color:#fff;width:26px;height:26px;border:none;border-radius:8px;font-size:11px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 10px -2px rgba(0,0,0,.3)}
body.mg-acc-active .mg-acc-user-meta{display:flex;flex-direction:column;gap:4px;min-width:0}
body.mg-acc-active .mg-acc-user-greet{font-size:11px;color:#6b7280}
body.mg-acc-active .mg-acc-user-name{font-size:14px;font-weight:700;color:#111827;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.mg-acc-active .mg-acc-user-mail{font-size:11px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:140px}
body.mg-acc-active .mg-acc-user-actions{display:flex;flex-direction:column;gap:6px}
body.mg-acc-active .mg-acc-btn{text-wrap-mode: nowrap;background:#f3f4f6;color:#374151;padding:6px 10px;border-radius:10px;font-size:12px;line-height:1;display:inline-flex;align-items:center;justify-content:center;font-weight:600;box-shadow:0 2px 4px -1px rgba(0,0,0,.1);transition:.25s}
body.mg-acc-active .mg-acc-btn.danger{background:#fee2e2;color:#b91c1c}
body.mg-acc-active .mg-acc-btn .mg-acc-ico-logout{display:block;width:16px;height:16px}
body.mg-acc-active .mg-acc-btn:hover{transform:translateY(-2px);box-shadow:0 6px 14px -4px rgba(0,0,0,.15)}
body.mg-acc-active .mg-acc-menu{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;position:relative}
body.mg-acc-active .mg-acc-menu-link{position:relative;display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:12px;font-size:13px;font-weight:500;color:#374151;text-decoration:none;background:linear-gradient(135deg,#ffffff,#f9fafb);border:1px solid #eef2f7;transition:.35s}
body.mg-acc-active .mg-acc-menu-link:hover{background:linear-gradient(135deg,#ffffff,#eef2f7);box-shadow:0 4px 10px -3px rgba(0,0,0,.12)}
body.mg-acc-active .mg-acc-menu-item.is-active .mg-acc-menu-link{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 6px 18px -6px rgba(173,0,0,.6)}
body.mg-acc-active .mg-acc-menu-ic{width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#f3f4f6;color:var(--brand);font-size:13px;flex:0 0 auto;box-shadow:0 2px 4px -2px rgba(0,0,0,.15);transition:.3s}
body.mg-acc-active .mg-acc-menu-item.is-active .mg-acc-menu-ic{background:rgba(255,255,255,.15);color:#fff;box-shadow:none}
body.mg-acc-active .mg-acc-active-bar{position:absolute;right:8px;top:50%;width:6px;height:6px;background:var(--brand);border-radius:50%;transform:translateY(-50%);opacity:0;transition:.3s}
body.mg-acc-active .mg-acc-menu-item.is-active .mg-acc-active-bar{opacity:1}
body.mg-acc-active .mg-acc-sidebar-footer{margin-top:auto;padding-top:6px;border-top:1px dashed #e5e7eb}
/* Mobile adjustments */
@media (max-width: 767px){
	body.mg-acc-active .mg-acc-aside{display:none}
	body.mg-acc-active [data-mg-drawer] .mg-acc-sidebar{border:none;background:transparent;box-shadow:none;padding:4px;min-width:240px;min-height:320px;}
	body.mg-acc-active [data-mg-drawer] .mg-acc-usercard{grid-template-columns:56px 1fr auto}
	body.mg-acc-active [data-mg-drawer] .mg-acc-avatar-img{width:56px;height:56px;border-radius:16px}
	body.mg-acc-active [data-mg-drawer] .mg-acc-menu-link{padding:9px 12px}
}
@media (min-width:1024px){body.mg-acc-active #mg-acc-main{min-height:600px}}
/* mobile drawer */
body.mg-acc-active [data-mg-drawer-overlay]{backdrop-filter:blur(2px)}
/* Drawer: fixed, full-height with its own scroll; keep overlay non-scrollable */
body.mg-acc-active [data-mg-drawer-overlay]{overflow:hidden}
body.mg-acc-active [data-mg-drawer]{background:#fff;position:fixed;top:0!important;right:0!important;left:auto!important;width:320px;max-width:90vw;height:100vh;box-shadow:0 0 0 1px #e5e7eb,0 10px 40px -10px rgba(0,0,0,.25);display:flex;flex-direction:column;transform:translateX(100%);transition:.35s;z-index:99999;overflow-y:auto;-webkit-overflow-scrolling:touch}
body.mg-acc-active [data-mg-drawer-overlay].open [data-mg-drawer]{transform:translateX(0)}
/* Keep the drawer header visible while scrolling */
body.mg-acc-active [data-mg-drawer] > .flex{position:sticky;top:0;background:#fff;z-index:1}

/* Enhanced mobile trigger (more distinctive) */
body.mg-acc-active .mg-acc-mobile-trigger{display:flex;position:sticky;top:0;z-index:50;background:var(--brand);color:#fff;border:none;border-radius:14px;padding:10px 18px;font-size:13px;font-weight:600;box-shadow:0 6px 18px -6px rgba(173,0,0,.5);animation:mgPulse 2.8s infinite;transition:.35s}
body.mg-acc-active .mg-acc-mobile-trigger i{font-size:16px}
body.mg-acc-active .mg-acc-mobile-trigger:active{transform:scale(.96)}
@keyframes mgPulse{0%{box-shadow:0 0 0 0 rgba(173,0,0,.55)}70%{box-shadow:0 0 0 14px rgba(173,0,0,0)}100%{box-shadow:0 0 0 0 rgba(173,0,0,0)}}
@media (min-width:850px){body.mg-acc-active .mg-acc-mobile-trigger{display:none}}

/* New mobile top bar */
body.mg-acc-active .mg-acc-mobile-header{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#ffffff;border:1px solid #e5e7eb;border-radius:18px;padding:10px 14px;margin-bottom:16px;box-shadow:0 4px 14px -6px rgba(0,0,0,.08);position:sticky;top:80px;z-index:60}
@media (min-width:850px){body.mg-acc-active .mg-acc-mobile-header{display:none}}
body.mg-acc-active .mg-acc-mobile-header .mob-right{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:#111827}
body.mg-acc-active .mg-acc-mobile-header .mob-right i{color:var(--brand);font-size:16px}
body.mg-acc-active .mg-acc-mobile-header .mob-right .mob-greet{font-weight:500;color:#6b7280;font-size:12px}
body.mg-acc-active .mg-acc-mobile-header .mob-right .mob-name{max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* enhanced menu trigger */
body.mg-acc-active .mg-acc-menu-trigger{background:linear-gradient(135deg,#ffffff,#f3f4f6)!important;border:1px solid #e5e7eb;width:auto;height:auto;padding:8px 14px;border-radius:14px;display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:#374151;position:relative;box-shadow:0 4px 10px -4px rgba(0,0,0,.12);}
body.mg-acc-active .mg-acc-menu-trigger:hover{background:#fff}
body.mg-acc-active .mg-acc-menu-trigger-ic{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:8px;background:var(--brand);color:#fff;font-size:13px;box-shadow:0 2px 6px -2px rgba(173,0,0,.5)}
body.mg-acc-active .mg-acc-menu-trigger-label{line-height:1}
body.mg-acc-active .mob-right{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
body.mg-acc-active .mob-right .mob-name{font-weight:600;font-size:13px;line-height:1.2}
body.mg-acc-active .mob-right .mob-contact{font-size:11px;color:#666;direction:ltr;unicode-bidi:plaintext}
body.mg-acc-active .mg-acc-mobile-header .mob-right{flex:0 0 auto;flex-direction:row;align-items:center;gap:0}
body.mg-acc-active .mg-acc-mobile-header .mob-avatar{width:45px;height:45px;border-radius:18px;overflow:hidden;position:relative;background:#f3f4f6;display:flex;align-items:center;justify-content:center;font-size:24px;color:#888;border:1px solid #e5e7eb}
body.mg-acc-active .mg-acc-mobile-header .mob-avatar img{width:100%;height:100%;object-fit:cover;display:block}
body.mg-acc-active .mg-acc-mobile-header .mob-center{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;min-width:0}
body.mg-acc-active .mg-acc-mobile-header .mob-line1{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#111827}
body.mg-acc-active .mg-acc-mobile-header .mob-line1 .mob-greet{font-weight:500;color:#6b7280;font-size:12px}
body.mg-acc-active .mg-acc-mobile-header .mob-center .mob-name{font-size:13px;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.mg-acc-active .mg-acc-mobile-header .mob-center .mob-contact{margin-top:4px;font-size:11px;color:#555;direction:ltr;unicode-bidi:plaintext;font-weight:500}
body.mg-acc-active .mg-acc-mobile-header .mob-left{margin-right:auto;display:flex;align-items:center}
body.mg-acc-active .mg-acc-mobile-header .mob-left{display:flex;align-items:center;gap:10px}
body.mg-acc-active .mg-acc-mobile-header .icon-btn{margin:0px;background:#f3f4f6;border:1px solid #e5e7eb;width:100%;height:40px;border-radius:14px;color:#374151;display:inline-flex;align-items:center;justify-content:center;font-size:16px;position:relative;box-shadow:0 2px 6px -2px rgba(0,0,0,.12);transition:.25s}
body.mg-acc-active .mg-acc-mobile-header .icon-btn:hover{background:#fff}
body.mg-acc-active .mg-acc-mobile-header .notif-badge{position:absolute;top:4px;left:4px;background:var(--brand);color:#fff;border-radius:10px;font-size:10px;line-height:1;padding:2px 5px;font-weight:700;box-shadow:0 0 0 2px #fff}

/* Notification panel (hidden placeholder) */
body.mg-acc-active .mg-acc-notifs-panel{position:fixed;top:0;left:0;right:0;bottom:0;z-index:99999;display:none;}
body.mg-acc-active .mg-acc-notifs-panel[data-open="1"]{display:block}
body.mg-acc-active .mg-acc-notifs-panel .mg-acc-notifs-overlay{position:absolute;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(2px)}
body.mg-acc-active .mg-acc-notifs-panel .mg-acc-notifs-drawer{position:absolute;top:0;right:0;width:320px;max-width:90%;height:100%;background:#fff;box-shadow:0 0 0 1px #e5e7eb,0 10px 40px -10px rgba(0,0,0,.25);display:flex;flex-direction:column;transform:translateX(100%);transition:.35s}
body.mg-acc-active .mg-acc-notifs-panel[data-open="1"] .mg-acc-notifs-drawer{transform:translateX(0)}
body.mg-acc-active .mg-acc-notifs-panel header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #f1f5f9}
body.mg-acc-active .mg-acc-notifs-panel header h3{margin:0;font-size:14px;font-weight:700}
body.mg-acc-active .mg-acc-notifs-list{flex:1;overflow:auto;padding:10px 0}
body.mg-acc-active .mg-acc-notif-item{padding:10px 16px;font-size:12px;display:flex;flex-direction:column;gap:4px;border-bottom:1px solid #f1f5f9}
body.mg-acc-active .mg-acc-notif-item.unread{background:#fef2f2}
body.mg-acc-active .mg-acc-notif-item{cursor:pointer}
body.mg-acc-active .mg-acc-notif-item:hover{background:#f8fafc}
body.mg-acc-active .mg-acc-notif-item .mg-acc-notif-msg{font-size:11px;line-height:1.5;color:#555;margin-top:2px;white-space:normal}
body.mg-acc-active [data-mg-notifs-mark-all]{background:#f1f5f9;border:1px solid #e2e8f0;padding:4px 8px;border-radius:6px;cursor:pointer}
body.mg-acc-active [data-mg-notifs-mark-all]:hover{background:#e2e8f0}
body.mg-acc-active .mg-acc-notif-time{font-size:10px;color:#6b7280}
/* Orders full view */
body.mg-acc-active .mg-orders-status-tabs .mg-ord-tab{background:#f3f4f6;border:1px solid #e5e7eb;padding:5px 15px;border-radius:999px;cursor:pointer;font-weight:500;transition:.25s;color:#374151;font-size: 12px;}
body.mg-acc-active .mg-orders-status-tabs .mg-ord-tab.is-active{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 4px 12px -4px rgba(173,0,0,.5)}
body.mg-acc-active .mg-orders-status-tabs .mg-ord-tab:not(.is-active):hover{background:#e5e7eb}
body.mg-acc-active .mg-acc-orders table{border-collapse:collapse}
body.mg-acc-active .mg-acc-orders table th,body.mg-acc-active .mg-acc-orders table td{font-size:12px}

/* Hide footer only within MG Account pages (avoid global impact) */
body.mg-acc-active #footer { display: none !important; }

/* Shortcode notification button minimal style */
.mg-acc-notif-shortcode-wrapper{margin:0!important;padding:0!important;line-height:1;}
.mg-acc-notif-shortcode-wrapper .mg-acc-notif-btn{margin:0!important;padding:0!important;background:transparent;border:none;box-shadow:none;width:auto;height:auto;font-size:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center;color:var(--brand,#ad0000);cursor:pointer;}
.mg-acc-notif-shortcode-wrapper .mg-acc-notif-btn i{font-size:1em;line-height:1;}
.mg-acc-notif-shortcode-wrapper .mg-acc-notif-btn:hover{color:#d40000;}
.mg-acc-notif-shortcode-wrapper .mg-acc-notif-btn .notif-badge{position:absolute;top:4px;left:-6px;background:var(--brand,#ad0000);color:#fff;border-radius:10px;font-size:10px;line-height:1;padding:2px 5px;font-weight:700;box-shadow:0 0 0 2px #fff}

/* Limit table padding tweak to the account main area only */
body.mg-acc-active #mg-acc-main td:first-child,
body.mg-acc-active #mg-acc-main th:first-child {
	padding-right: 0.75rem !important;
	padding-left: 0.75rem !important;
}

/* ================= Address Form (Advanced) ================= */
body.mg-acc-active .mg-address-form--card{position:relative;background:#ffffff;border:1px solid #e5e7eb;border-radius:22px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 6px 22px -8px rgba(0,0,0,.12);max-width:980px;margin:0 auto 28px;}
body.mg-acc-active .mg-address-form--card:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 85% 10%,rgba(173,0,0,.08),transparent 55%),radial-gradient(circle at 10% 90%,rgba(173,0,0,.06),transparent 60%);} 
body.mg-acc-active .mg-address-form--card .mg-af-body{padding:26px 28px 8px;}
@media (max-width:740px){body.mg-acc-active .mg-address-form--card .mg-af-body{padding:20px 18px 4px}}
body.mg-acc-active .mg-address-form--card .mg-af-footer{margin-top:4px;padding:14px 22px 18px;display:flex;justify-content:flex-end;align-items:center;gap:12px;background:linear-gradient(to top,#ffffff,rgba(255,255,255,.92));border-top:1px solid #f1f5f9;}
@media (max-width:740px){body.mg-acc-active .mg-address-form--card .mg-af-footer{padding:14px 16px 18px}}

/* Fields shell */
body.mg-acc-active .mg-address-form .mg-field{position:relative;display:flex;flex-direction:column;gap:6px;padding:14px 14px 16px;border:1px solid #e2e8f0;border-radius:18px;background:linear-gradient(135deg,#ffffff,#f9fafb);box-shadow:0 2px 4px -2px rgba(0,0,0,.08),0 1px 0 rgba(255,255,255,.4) inset;transition:.35s}
body.mg-acc-active .mg-address-form .mg-field:hover{border-color:#d0d7df}
body.mg-acc-active .mg-address-form .mg-field:before{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1px;background:linear-gradient(140deg,rgba(173,0,0,.55),rgba(173,0,0,0));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude;opacity:0;transition:.4s}
body.mg-acc-active .mg-address-form .mg-field:before{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1px;background:linear-gradient(140deg,rgba(173,0,0,.55),rgba(173,0,0,0));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude;opacity:0;transition:.4s;pointer-events:none;z-index:0}
body.mg-acc-active .mg-address-form .mg-field:focus-within:before{opacity:1}

/* Labels */
body.mg-acc-active .mg-address-form span.mg-label{font-size:11px;font-weight:700;letter-spacing:.04em;color:#64748b;text-transform:uppercase;display:flex;align-items:center;gap:4px}
body.mg-acc-active .mg-address-form span.mg-label:after{content:"";flex:1;height:1px;background:linear-gradient(to left,#e2e8f0,transparent);margin-right:6px;opacity:.4}

/* Inputs & selects */
body.mg-acc-active .mg-address-form select,body.mg-acc-active .mg-address-form input[type=text],body.mg-acc-active .mg-address-form input[type=email]{height:38px;background:#ffffff;border:1px solid #d1d9e1;border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.25;color:#0f172a;box-shadow:0 1px 2px rgba(0,0,0,.04) inset;transition:.25s;font-weight:500}
body.mg-acc-active .mg-address-form select{cursor:pointer;position:relative;z-index:1}
body.mg-acc-active .mg-address-form .ltr-field{direction:ltr;text-align:left;unicode-bidi:plaintext;font-variant-numeric:tabular-nums;letter-spacing:.5px}
body.mg-acc-active .mg-address-form input::-webkit-outer-spin-button,body.mg-acc-active .mg-address-form input::-webkit-inner-spin-button{margin:0}
body.mg-acc-active .mg-address-form input[type=number]{-moz-appearance:textfield;appearance:textfield}

/* Location view block */
body.mg-acc-active .mg-address-form [data-mg-location-view]{background:linear-gradient(125deg,#f8fafc,#eef2f7);padding:14px 16px;border:1px dashed #cbd5e1;border-radius:14px;display:flex;flex-direction:column;gap:10px}
body.mg-acc-active .mg-address-form [data-mg-location-view] strong{font-size:13px}
body.mg-acc-active .mg-address-form [data-mg-location-change]{align-self:flex-start;background:#ffffff;border:1px solid #cbd5e1;font-size:11px;padding:6px 10px;border-radius:10px;line-height:1;font-weight:600;display:inline-flex;align-items:center;gap:6px;cursor:pointer;transition:.25s;box-shadow:0 2px 4px -2px rgba(0,0,0,.1)}
body.mg-acc-active .mg-address-form [data-mg-location-change]:hover{background:var(--brand,#ad0000);color:#fff;border-color:var(--brand,#ad0000);box-shadow:0 4px 12px -3px rgba(173,0,0,.5)}
body.mg-acc-active .mg-address-form [data-mg-location-edit]{background:#ffffff;border:1px solid #e2e8f0;padding:16px 16px 12px;border-radius:14px;display:flex;flex-direction:column;gap:10px}
body.mg-acc-active .mg-address-form .hint{font-size:11px;color:#94a3b8;margin-top:4px}

/* Footer save */
body.mg-acc-active .mg-address-form .mg-af-save{--cl1:var(--brand,#ad0000);--cl2:#d70000;background:linear-gradient(135deg,var(--cl1),var(--cl2));color:#fff;font-weight:700;font-size:12px;padding:12px 22px;border:none;border-radius:14px;display:inline-flex;align-items:center;gap:10px;box-shadow:0 6px 18px -6px rgba(173,0,0,.6);cursor:pointer;position:relative;overflow:hidden;isolation:isolate;transition:.4s}
body.mg-acc-active .mg-address-form .mg-af-save:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 30% 30%,rgba(255,255,255,.35),transparent 60%);opacity:.9;mix-blend-mode:overlay;pointer-events:none}
body.mg-acc-active .mg-address-form .mg-af-save:hover{filter:brightness(1.08);transform:translateY(-2px);box-shadow:0 10px 26px -8px rgba(173,0,0,.65)}
body.mg-acc-active .mg-address-form .mg-af-save:active{transform:translateY(0)}
body.mg-acc-active .mg-address-form .mg-af-save-ic{width:16px;height:16px;display:inline-block;position:relative}
body.mg-acc-active .mg-address-form .mg-af-save-ic:before,body.mg-acc-active .mg-address-form .mg-af-save-ic:after{content:"";position:absolute;background:#fff;border-radius:2px}
body.mg-acc-active .mg-address-form .mg-af-save-ic:before{width:100%;height:70%;bottom:0;left:0;clip-path:polygon(0 0,100% 0,100% 60%,0 60%)}
body.mg-acc-active .mg-address-form .mg-af-save-ic:after{width:45%;height:28%;top:2px;left:28%;border-radius:2px 2px 0 0}
body.mg-acc-active .mg-address-form .mg-af-save-label{position:relative;z-index:2}

/* Responsive tweak: stack fields */
@media (max-width:640px){body.mg-acc-active .mg-address-form .grid{grid-template-columns:1fr !important;gap:14px}}

/* Validation states (future use) */
body.mg-acc-active .mg-address-form .is-error select,body.mg-acc-active .mg-address-form .is-error input{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.25)}
body.mg-acc-active .mg-address-form .is-error .mg-label{color:#dc2626}
/* Profile form minor tweaks */
body.mg-acc-active .mg-profile-form .mg-af-body{padding-top:20px}
body.mg-acc-active .mg-profile-form .mg-field input[type=file]{padding:6px 4px;font-size:11px}