.at-app{font-family:inherit;line-height:1.9;color:#172b4d;margin:20px 0}.at-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:18px}.at-card{padding:22px;background:#fff;border:1px solid #dce5f2;border-radius:18px;box-shadow:0 5px 20px #193b6b08}.at-card h3{font-size:20px}.at-flag{font-size:32px}.at-app button{background:#1464df;color:white;border:0;border-radius:10px;padding:11px 19px;font:inherit;cursor:pointer;margin:6px}.at-app button:disabled{opacity:.5;cursor:wait}.at-notice:not(:empty){padding:14px;background:#edf4ff;border-right:4px solid #1464df;border-radius:8px;margin:16px 0}.at-panel form{background:#f6f9ff;border-radius:14px;padding:18px;margin:18px 0}.at-app label{display:block}.at-app input{display:block;max-width:100%;width:320px;border:1px solid #cdd9ec;border-radius:8px;padding:10px;margin:8px 0}.at-panel [data-at-orders]{display:grid;gap:14px;margin-bottom:20px}.at-panel [data-at-detail]{background:#edf4ff;border-radius:16px;padding:24px;overflow-wrap:anywhere}.at-app [hidden]{display:none!important}

/* Account Tel login button + popup */
.at-header-login-btn{
 display:inline-flex!important;
 align-items:center;
 justify-content:center;
 background:linear-gradient(135deg,#1464df,#2f8cff)!important;
 color:#fff!important;
 padding:10px 28px!important;
 border-radius:14px!important;
 font-weight:700;
 text-decoration:none!important;
 box-shadow:0 8px 18px rgba(20,100,223,.25);
 transition:.2s;
}
.at-header-login-btn:hover{transform:translateY(-1px);color:#fff!important}
.at-login-overlay{
 display:none;
 position:fixed;
 inset:0;
 background:rgba(0,0,0,.55);
 z-index:99999;
 align-items:center;
 justify-content:center;
 padding:20px;
}
.at-login-card{
 background:#fff;
 width:min(420px,95%);
 direction:rtl;
 padding:28px;
 border-radius:22px;
 box-shadow:0 20px 60px rgba(0,0,0,.25);
}
.at-login-card h3{font-size:28px;margin:10px 0;color:#1464df}
.at-login-card input{
 width:100%!important;
 box-sizing:border-box;
 padding:12px!important;
 margin:8px 0!important;
 border:1px solid #d5e2f5!important;
 border-radius:12px!important;
}
#at-auth-btn{
 background:linear-gradient(135deg,#1464df,#2f8cff)!important;
 color:white;
 width:100%;
 padding:12px 20px;
 border:0;
 border-radius:12px;
 font-weight:700;
}

.at-header-login-btn{display:inline-flex!important;align-items:center;justify-content:center;background:linear-gradient(135deg,#1464df,#0b3fa8);color:#fff!important;padding:10px 24px;border-radius:12px;font-weight:700;text-decoration:none;box-shadow:0 8px 20px rgba(20,100,223,.25)}
.at-modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:99999;align-items:center;justify-content:center;padding:20px}
.at-auth-card{width:min(420px,100%);background:#fff;border-radius:24px;padding:28px;box-shadow:0 20px 60px rgba(0,0,0,.25);position:relative;text-align:center}
.at-close{position:absolute;left:15px;top:10px;border:0;background:none;font-size:28px;cursor:pointer}
.at-logo{font-size:40px}
.at-auth-card h3{color:#1464df;margin:8px 0}
.at-subtitle{color:#667085}
.at-tabs{display:flex;background:#eef5ff;border-radius:14px;padding:5px;margin:20px 0}
.at-tabs button{flex:1;border:0;background:none;padding:10px;border-radius:10px;cursor:pointer}
.at-tabs button.active{background:#1464df;color:#fff}
.at-auth-form input{width:100%;box-sizing:border-box;padding:12px;border:1px solid #d8e2f0;border-radius:12px;margin:7px 0}
.at-primary{width:100%;border:0!important;background:#1464df!important;color:#fff!important;border-radius:12px!important;padding:13px!important}

/* Shop cards: keep this scoped so wallet/order cards retain their layout. */
.at-shop .at-grid{grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr))}
.at-shop .at-product-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 22px;gap:0;min-width:0}
.at-shop .at-country-avatar{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:88px;height:88px;box-sizing:border-box;margin:0 auto 14px;border:1px solid #dce7fb;border-radius:50%;background:#f2f7ff;box-shadow:0 5px 16px #1464df08}
.at-shop .at-country-avatar .at-flag{display:block;font-size:46px;line-height:1;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.at-shop .at-country-avatar img.at-flag{width:52px;height:39px;max-width:52px;object-fit:contain;border-radius:4px}
.at-shop .at-product-card h3{margin:0 0 8px;line-height:1.7;color:#172b4d}
.at-shop .at-product-price{margin:0 0 18px;font-size:18px;color:#172b4d}
.at-shop .at-product-card [data-at-buy]{align-self:stretch;margin:auto 0 0;font-weight:700}
.at-shop .at-product-card [data-at-buy]:disabled{cursor:not-allowed}

/* One modal controller handles header login and guest purchases. */
body.at-auth-open{overflow:hidden}
#at-login-modal{box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain}
#at-login-modal .at-auth-card{box-sizing:border-box;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow-y:auto}
#at-login-modal [hidden]{display:none!important}
#at-login-modal .at-auth-msg{margin-top:14px;line-height:1.8;overflow-wrap:anywhere;color:#344563}
#at-login-modal input[type="hidden"]{display:none!important}
#at-login-modal button:disabled{opacity:.6;cursor:wait}
#at-login-modal :focus-visible{outline:2px solid #1464df;outline-offset:3px}
@media(max-width:480px){#at-login-modal{padding:12px}#at-login-modal .at-auth-card{padding:24px 18px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}}

/* Profile icon and functional signed-in header button. */
.at-header-account-btn{gap:9px!important;line-height:1.5}
.at-avatar-icon{display:block;flex-shrink:0}
.at-header-account-btn .at-avatar-icon{width:22px;height:22px;padding:4px;border:1px solid #ffffff80;border-radius:50%;box-sizing:content-box}
#at-login-modal .at-auth-avatar{display:flex;align-items:center;justify-content:center;width:76px;height:76px;margin:0 auto 16px;border:2px solid #1464df;border-radius:50%;background:#f0f6ff;color:#1464df;box-sizing:border-box}
#at-login-modal .at-auth-avatar .at-avatar-icon{width:42px;height:42px}

/* Purchase confirmation uses the country card's actual name, image and price. */
#at-purchase-modal{box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain}
#at-purchase-modal .at-purchase-card{box-sizing:border-box;width:min(420px,100%);max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow-y:auto;background:#fff;color:#172b4d;border:1px solid #e4ebf7;border-radius:24px;padding:34px 28px 26px;text-align:center;position:relative;box-shadow:0 24px 70px #071a3d30;animation:at-purchase-in .2s ease-out}
#at-purchase-modal .at-country-avatar{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:96px;height:96px;margin:2px auto 20px;border-radius:50%;border:1px solid #dce7fb;background:#f2f7ff}
#at-purchase-modal .at-country-avatar .at-flag{font-size:48px;line-height:1}
#at-purchase-modal .at-country-avatar img.at-flag{display:block;width:56px;height:42px;object-fit:contain;border-radius:4px}
#at-purchase-modal .at-purchase-caption{font-size:13px;color:#74839b;margin:0 0 8px}
#at-purchase-modal h3{font:inherit;font-size:25px;font-weight:700;color:#172b4d;line-height:1.6;margin:0 0 10px;overflow-wrap:anywhere}
#at-purchase-modal .at-purchase-price{font-size:22px;font-weight:700;margin:0 0 10px;line-height:1.8}
#at-purchase-modal .at-purchase-hint{font-size:13px;color:#63768f;line-height:1.8;margin:0 0 24px}
#at-purchase-modal .at-purchase-confirm,#at-purchase-modal .at-purchase-cancel{display:block;width:100%;font:inherit;font-weight:700;line-height:1.8;padding:12px 16px;border-radius:12px;cursor:pointer;transition:background .15s,border-color .15s;box-sizing:border-box}
#at-purchase-modal .at-purchase-confirm{background:#159661;color:#fff;border:1px solid #159661;margin:0 0 10px;box-shadow:0 6px 16px #15966120}
#at-purchase-modal .at-purchase-confirm:hover{background:#087f4f;border-color:#087f4f}
#at-purchase-modal .at-purchase-cancel{background:#fff1f2;color:#cf3545;border:1px solid #ffdae0;margin:0}
#at-purchase-modal .at-purchase-cancel:hover{background:#ffe5e9;border-color:#ffc2cb}
#at-purchase-modal .at-close{color:#6c7d94;line-height:1;padding:6px}
#at-purchase-modal button:disabled{opacity:.6;cursor:wait}
#at-purchase-modal :focus-visible,.at-header-account-btn:focus-visible{outline:2px solid #1464df;outline-offset:3px}
@keyframes at-purchase-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}

/* Top-right notices: enter left-to-right, fill for 4s, leave right-to-left. */
.at-toast-region{position:fixed;right:18px;top:100px;width:min(390px,calc(100vw - 36px));display:flex;flex-direction:column;gap:10px;z-index:100100;pointer-events:none;font-family:inherit}
.at-toast{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr) 24px;align-items:start;gap:10px;box-sizing:border-box;padding:16px 14px 20px;overflow:hidden;border:1px solid;border-radius:14px;box-shadow:0 10px 28px #102e4f1a;pointer-events:auto;animation:at-toast-in .26s ease-out both;text-align:right;line-height:1.9}
.at-toast-success{background:#edfbf3;border-color:#a4dfbe;color:#116b44;--at-toast-accent:#12884f;--at-toast-track:#d1efdf}
.at-toast-error{background:#fff1f2;border-color:#f3b5bf;color:#a12236;--at-toast-accent:#d8354e;--at-toast-track:#f9dce1}
.at-toast .at-toast-icon{display:flex;align-items:center;justify-content:center;width:26px;height:26px;background:var(--at-toast-accent);border-radius:50%;color:#fff;font:700 17px/1 sans-serif;margin-top:2px}
.at-toast .at-toast-text{margin:0;font:inherit;font-size:14px;overflow-wrap:anywhere;min-width:0;color:inherit}
.at-toast .at-toast-close{display:block;box-sizing:border-box;width:24px;height:28px;border:0;background:transparent;color:inherit;padding:0;margin:0;font:24px/1 sans-serif;opacity:.8;cursor:pointer;border-radius:4px}
.at-toast-close:focus-visible{outline:2px solid currentColor;outline-offset:1px}
.at-toast .at-toast-track{position:absolute;left:0;right:0;bottom:0;height:4px;background:var(--at-toast-track);direction:ltr}
.at-toast .at-toast-fill{display:block;width:100%;height:100%;background:var(--at-toast-accent);transform:scaleX(0);transform-origin:left center;animation:at-toast-fill 4s linear forwards}
.at-toast.at-toast-leaving{animation:at-toast-out .24s ease-in forwards}
@keyframes at-toast-in{from{opacity:0;transform:translateX(-32px)}to{opacity:1;transform:translateX(0)}}
@keyframes at-toast-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-32px)}}
@keyframes at-toast-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(max-width:480px){#at-purchase-modal{padding:12px}#at-purchase-modal .at-purchase-card{padding:30px 20px 22px;max-height:calc(100dvh - 24px)}.at-toast-region{right:12px;width:calc(100vw - 24px)}}
@media(prefers-reduced-motion:reduce){.at-toast,.at-toast.at-toast-leaving,#at-purchase-modal .at-purchase-card{animation:none}.at-header-login-btn:hover{transform:none}}
