/* ATHAR 2.0 — 126 UI SETTINGS
 * 1) Compact top header (all sizes come from CSS variables that Admin -> Settings UI can change: storeData/uiSettings)
 * 2) Header country selector (flag + currency, small dropdown with search)
 * 3) Admin-added elements (storeData/customBlocks)
 * 4) Notification card (opens when a notification is tapped)
 */

/* ───────── variables (defaults = compact; admin overrides them live) ───────── */
:root{
  --u-logo:30px; --u-brand:15px; --u-icon:30px; --u-bal:11px;
  --u-btn:11px;  --u-btnh:28px;  --u-hh:46px;   --u-gap:6px;
  --u-real-hh:46px;
}

/* ───────── 1) compact header ───────── */
html body .top-header{
  box-sizing:border-box!important;
  min-height:var(--u-hh)!important;
  padding:5px 10px!important;
  gap:var(--u-gap)!important;
}
html body .top-header .header-left{gap:7px!important}
html body .top-header .header-logo-img{
  box-sizing:border-box!important;
  width:var(--u-logo)!important;height:var(--u-logo)!important;max-width:none!important;
  border-radius:9px!important;box-shadow:0 2px 8px rgba(225,29,46,.35)!important;
}
html body .top-header .brand-text{font-size:var(--u-brand)!important;gap:4px!important;letter-spacing:.2px}
html body .top-header .header-right{gap:var(--u-gap)!important}
html body .ath-actions{gap:var(--u-gap)!important}

html body .ath-bell{
  width:var(--u-icon)!important;height:var(--u-icon)!important;min-width:var(--u-icon)!important;
  border-radius:9px!important;font-size:calc(var(--u-icon) * .46)!important;
}
html body .ath-bell-dot{
  min-width:14px!important;height:14px!important;padding:0 3px!important;font-size:8px!important;
  top:-5px!important;right:-5px!important;border-width:1.5px!important;
}
html body .ath-bal{
  height:var(--u-icon)!important;padding:0 8px!important;border-radius:9px!important;
  font-size:var(--u-bal)!important;gap:5px!important;
}
html body .ath-bal i{font-size:calc(var(--u-bal) + 1px)!important}
html body .ath-avatar{
  width:var(--u-icon)!important;height:var(--u-icon)!important;min-width:var(--u-icon)!important;
  font-size:calc(var(--u-icon) * .42)!important;
}
html body .ath-avatar .ath-on{width:8px!important;height:8px!important;border-width:1.5px!important}
html body .ath-login,html body .ath-reg{
  height:var(--u-btnh)!important;min-height:0!important;padding:0 10px!important;
  font-size:var(--u-btn)!important;border-radius:9px!important;line-height:1!important;
}

/* page content must start right under the (now smaller) header */
html body{padding-top:calc(var(--u-real-hh) + 4px)!important}
html body.athar-v10-notice-spacer{padding-top:calc(var(--u-real-hh) + 4px)!important}
html.ath-no-bell .ath-bell{display:none!important}

/* ───────── 2) header country selector ───────── */
html body .top-header .header-right > .ath-cc{display:block!important;position:relative;flex:none}
html.ath-no-cc #athCC{display:none!important}
.ath-cc-btn{
  display:flex;align-items:center;gap:4px;height:var(--u-icon);padding:0 7px;
  border-radius:9px;background:#14080a;color:#fff;cursor:pointer;
  border:1.5px solid rgba(255,59,78,.5);font-weight:800;font-size:var(--u-bal);line-height:1;font-family:inherit;
  -webkit-tap-highlight-color:transparent;
}
.ath-cc-btn .ath-cc-flag{font-size:calc(var(--u-bal) + 5px);line-height:1}
.ath-cc-btn .ath-cc-code{letter-spacing:.3px;max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ath-cc-btn .ath-cc-code:empty{display:none}
.ath-cc-btn i{font-size:8px;color:#ff6b7a;transition:transform .2s}
.ath-cc.open .ath-cc-btn i{transform:rotate(180deg)}
.ath-cc.open .ath-cc-btn{border-color:#ff3b4e;box-shadow:0 0 0 3px rgba(255,59,78,.18)}

.ath-cc-menu{
  position:fixed;z-index:2147483100;display:none;flex-direction:column;
  background:linear-gradient(180deg,#190809,#0b0405);color:#fff;
  border:1.5px solid rgba(255,59,78,.45);border-radius:14px;
  box-shadow:0 14px 40px rgba(0,0,0,.65),0 0 24px rgba(225,29,46,.18);overflow:hidden;
}
.ath-cc-menu.show{display:flex;animation:athccIn .16s ease-out}
@keyframes athccIn{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}
.ath-cc-search{padding:8px;border-bottom:1px solid rgba(255,59,78,.2);flex:none}
.ath-cc-search input{
  width:100%;box-sizing:border-box;height:32px;border-radius:9px;padding:0 10px;font-size:13px;
  background:#0f0607;border:1px solid rgba(255,59,78,.3);color:#fff;outline:0;
}
.ath-cc-search input:focus{border-color:#ff3b4e}
.ath-cc-list{overflow-y:auto;-webkit-overflow-scrolling:touch;padding:5px;flex:1;min-height:0}
.ath-cc-opt{
  display:flex;align-items:center;gap:9px;width:100%;padding:8px 9px;border:0;border-radius:9px;
  background:transparent;color:#f1e4e6;font-weight:700;font-size:13px;line-height:1.2;font-family:inherit;text-align:left;cursor:pointer;
}
.ath-cc-opt .f{font-size:18px;line-height:1;flex:none}
.ath-cc-opt .n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ath-cc-opt small{font-size:10.5px;color:#b88a90;font-weight:700;flex:none}
.ath-cc-opt:hover,.ath-cc-opt:active{background:rgba(255,59,78,.14)}
.ath-cc-opt.on{background:rgba(255,59,78,.24);color:#fff}
.ath-cc-opt.on small{color:#ffb3bb}
.ath-cc-empty{padding:14px;text-align:center;color:#b88a90;font-size:12px}

/* ───────── 3) admin-added elements ───────── */
.ath-blk-wrap{display:flex;flex-direction:column;gap:8px;margin:10px 0;box-sizing:border-box;max-width:100%}
.ath-blk-floating{position:fixed;z-index:2147482000;margin:0;max-width:min(92vw,360px)}
.ath-blk-floating.left{left:12px}
.ath-blk-floating.right{right:12px;align-items:flex-end}
.ath-blk{box-sizing:border-box;max-width:100%;text-decoration:none}
.ath-blk-text{white-space:pre-line;word-break:break-word;color:#fff;font-size:14px;line-height:1.45}
.ath-blk-btn{
  display:inline-flex;align-items:center;justify-content:center;text-align:center;font-weight:800;
  padding:11px 18px;border-radius:12px;color:#fff;font-size:14px;cursor:pointer;
  background:linear-gradient(135deg,#c4122a,#ff3b4e);border:0;box-shadow:0 6px 18px rgba(225,29,46,.35);
}
a.ath-blk-btn:active{transform:scale(.98)}
.ath-blk-img{display:block;height:auto;max-width:100%;border-radius:12px}

/* ───────── 4) notification card ───────── */
.athar-notify-item{cursor:pointer;position:relative;transition:border-color .15s,background .15s}
.athar-notify-item:active{background:#1d1013!important;border-color:#ff3b4e!important}
.athar-notify-item::after{content:'\203A';position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#ff6b7a;font-size:18px;font-weight:900}
.athar-notify-item{padding-right:26px!important}

.ath-nc-ov{
  position:fixed;inset:0;z-index:2147483200;display:flex;align-items:center;justify-content:center;
  padding:18px;background:rgba(3,1,2,.72);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
  opacity:0;transition:opacity .18s;
}
.ath-nc-ov.show{opacity:1}
.ath-nc{
  position:relative;width:min(100%,380px);max-height:86vh;display:flex;flex-direction:column;overflow:hidden;
  border-radius:22px;color:#fff;
  background:radial-gradient(120% 70% at 0% 0%,rgba(225,29,46,.28),transparent 60%),linear-gradient(170deg,#1d0a0d,#0a0405);
  border:1.5px solid rgba(255,59,78,.5);
  box-shadow:0 22px 60px rgba(0,0,0,.7),0 0 34px rgba(225,29,46,.25);
  transform:translateY(16px) scale(.96);transition:transform .22s cubic-bezier(.2,.9,.3,1.2);
}
.ath-nc-ov.show .ath-nc{transform:none}
.ath-nc-x{
  position:absolute;right:12px;top:12px;width:32px;height:32px;border-radius:10px;cursor:pointer;
  background:rgba(255,59,78,.14);border:1px solid rgba(255,59,78,.4);color:#ffd1d6;font-size:18px;line-height:1;z-index:2;
}
.ath-nc-top{display:flex;align-items:center;gap:11px;padding:18px 54px 0 18px}
.ath-nc-ico{
  width:46px;height:46px;border-radius:14px;flex:none;display:grid;place-items:center;overflow:hidden;
  background:linear-gradient(135deg,#991b1b,#e11d2e);box-shadow:0 6px 20px rgba(225,29,46,.5);font-size:20px;
}
.ath-nc-ico img{width:100%;height:100%;object-fit:cover;display:block}
.ath-nc-brand{font-size:11px;font-weight:800;letter-spacing:.6px;color:#ff8a96;text-transform:uppercase}
.ath-nc-title{margin:14px 18px 6px;font-size:18px;line-height:1.3;font-weight:900;word-break:break-word}
.ath-nc-time{margin:0 18px 12px;display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#c9a0a6;font-weight:700}
.ath-nc-body{
  margin:0 18px;padding:12px 13px;border-radius:14px;background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);font-size:14px;line-height:1.55;color:#f1e4e6;
  white-space:pre-wrap;word-break:break-word;overflow-y:auto;-webkit-overflow-scrolling:touch;min-height:40px;
}
.ath-nc-body:empty{display:none}
.ath-nc-actions{display:flex;gap:9px;padding:16px 18px 18px}
.ath-nc-actions a,.ath-nc-actions button{
  flex:1;height:42px;border-radius:12px;font-weight:800;font-size:14px;line-height:1;font-family:inherit;cursor:pointer;
  display:flex;align-items:center;justify-content:center;text-decoration:none;border:0;
}
.ath-nc-go{background:linear-gradient(135deg,#c4122a,#ff3b4e);color:#fff;box-shadow:0 6px 18px rgba(225,29,46,.4)}
.ath-nc-ok{background:rgba(255,255,255,.07);color:#f1e4e6;border:1px solid rgba(255,255,255,.12)!important}
