
.fxea-imm{
  padding:32px 0 42px;
  background:#fff;
  color:#10283d;
}
.fxea-imm--home{
  background:#f7fafc;
}
.fxea-imm-shell{
  width:min(1280px,calc(100% - 28px));
  margin-inline:auto;
}
.fxea-imm-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:16px;
}
.fxea-imm-eyebrow{
  display:block;
  margin-bottom:6px;
  color:#0878ff;
  font-size:9px;
  line-height:1;
  font-weight:900;
  letter-spacing:.18em;
}
.fxea-imm-head h2{
  margin:0;
  color:#0d2d48;
  font-size:28px;
  line-height:1.25;
}
.fxea-imm-head p{
  margin:8px 0 0;
  color:#718599;
  font-size:11px;
  line-height:1.7;
}
.fxea-imm-update{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:3px;
  flex:0 0 auto;
  color:#8192a2;
  font-size:8px;
}
.fxea-imm-update strong{
  color:#35516a;
  font-size:9px;
}
.fxea-imm-panel{
  overflow:hidden;
  border:1px solid #d9e5ee;
  border-radius:14px;
  background:#fff;
  box-shadow:0 12px 34px rgba(7,30,50,.05);
}
.fxea-imm-tabs{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  border-bottom:1px solid #dce6ed;
  background:#fff;
}
.fxea-imm-tabs button{
  position:relative;
  min-height:58px;
  padding:0 8px;
  border:0;
  border-right:1px solid #edf2f6;
  background:#fff;
  color:#8a99a9;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.fxea-imm-tabs button span{
  margin-right:4px;
}
.fxea-imm-tabs button:last-child{
  border-right:0;
}
.fxea-imm-tabs button::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:3px;
  background:transparent;
}
.fxea-imm-tabs button.is-active{
  color:#156ac0;
}
.fxea-imm-tabs button.is-active::after{
  background:#0878ff;
}
.fxea-imm-periods{
  display:flex;
  width:min(720px,calc(100% - 36px));
  margin:18px 18px 0;
}
.fxea-imm-periods button{
  flex:1;
  min-height:48px;
  padding:0 12px;
  border:1px solid #126fd0;
  border-right:0;
  background:#fff;
  color:#2d62aa;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.fxea-imm-periods button:first-child{
  border-radius:8px 0 0 8px;
}
.fxea-imm-periods button:last-child{
  border-right:1px solid #126fd0;
  border-radius:0 8px 8px 0;
}
.fxea-imm-periods button.is-active{
  background:#dff5ff;
}
.fxea-imm-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  padding:18px;
}
.fxea-imm-summary article{
  min-width:0;
  padding:13px 14px;
  border:1px solid #e0e9f0;
  border-radius:10px;
  background:#fbfcfe;
}
.fxea-imm-summary span,
.fxea-imm-summary small{
  display:block;
  color:#8193a3;
  font-size:8px;
  line-height:1.4;
  font-weight:700;
}
.fxea-imm-summary strong{
  display:block;
  margin:4px 0;
  color:#163752;
  font-size:18px;
  line-height:1.2;
  font-variant-numeric:tabular-nums;
}
.fxea-imm-summary strong.is-positive{color:#078f74}
.fxea-imm-summary strong.is-negative{color:#ef4f5f}
.fxea-imm-chart-wrap{
  position:relative;
  min-height:560px;
  padding:0 14px;
  border-top:1px solid #edf2f6;
}
.fxea-imm-chart{
  display:block;
  width:100%;
  height:auto;
  min-height:500px;
}
.fxea-imm-loading,
.fxea-imm-empty{
  position:absolute;
  inset:0;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  background:rgba(255,255,255,.82);
  color:#74889a;
  font-size:10px;
  font-weight:800;
}
.fxea-imm-spinner{
  width:15px;
  height:15px;
  border:2px solid #d6e5ef;
  border-top-color:#0878ff;
  border-radius:50%;
  animation:fxea-imm-spin .75s linear infinite;
}
@keyframes fxea-imm-spin{to{transform:rotate(360deg)}}
.fxea-imm-legend{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px 24px;
  padding:14px 18px 18px;
  color:#3f5669;
  font-size:9px;
  font-weight:800;
}
.fxea-imm-legend span{
  display:inline-flex;
  align-items:center;
  gap:7px;
}
.fxea-imm-legend i{
  display:inline-block;
  width:20px;
  height:3px;
  border-radius:99px;
}
.fxea-imm-legend i.is-net{background:#7a7de8;height:8px;width:8px;border-radius:50%}
.fxea-imm-legend i.is-long{background:#b7ddff}
.fxea-imm-legend i.is-short{background:#f6d995}
.fxea-imm-legend i.is-rate{background:#f10d0d}
.fxea-imm-foot{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:11px;
  color:#8799a8;
  font-size:8px;
  line-height:1.6;
}
.fxea-imm-foot a{
  margin-left:auto;
  color:#6d8397;
}
.fxea-imm-more{
  display:flex;
  justify-content:center;
  margin-top:16px;
}
.fxea-imm-more a{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:0 18px;
  border:1px solid #cfe0ed;
  border-radius:9px;
  background:#fff;
  color:#12344e;
  font-size:10px;
  font-weight:900;
  text-decoration:none;
}
@media(hover:hover) and (pointer:fine){
  .fxea-imm-tabs button:hover,
  .fxea-imm-periods button:hover{
    background:#f5faff;
  }
}
@media(max-width:760px){
  .fxea-imm{
    padding:24px 0 32px;
  }
  .fxea-imm-head{
    display:block;
  }
  .fxea-imm-head h2{
    font-size:23px;
  }
  .fxea-imm-update{
    align-items:flex-start;
    margin-top:9px;
  }
  .fxea-imm-panel{
    border-radius:12px;
  }
  .fxea-imm-tabs{
    display:flex;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .fxea-imm-tabs button{
    flex:0 0 112px;
    min-height:52px;
    font-size:10px;
  }
  .fxea-imm-periods{
    width:calc(100% - 24px);
    margin:12px 12px 0;
  }
  .fxea-imm-periods button{
    min-height:42px;
    font-size:10px;
  }
  .fxea-imm-summary{
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:12px;
  }
  .fxea-imm-summary strong{
    font-size:16px;
  }
  .fxea-imm-chart-wrap{
    min-height:450px;
    overflow-x:auto;
    padding:0;
  }
  .fxea-imm-chart{
    width:900px;
    max-width:none;
    min-height:430px;
  }
  .fxea-imm-foot{
    display:block;
  }
  .fxea-imm-foot span,
  .fxea-imm-foot a{
    display:block;
    margin:3px 0;
  }
}
@media(prefers-reduced-motion:reduce){
  .fxea-imm-spinner{animation:none}
}


/* v1.1.0 — lightweight page-only IMM loader */
.fxea-imm-empty{
  flex-direction:column!important;
  gap:12px!important;
}
.fxea-imm-empty strong{
  color:#6f8294;
  font-size:11px;
}
.fxea-imm-empty button{
  min-height:38px;
  padding:0 15px;
  border:1px solid #b9d6ef;
  border-radius:8px;
  background:#fff;
  color:#0878ff;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}


/* =========================================================
   v1.1.1 — overlay visibility + compact controls
   ========================================================= */

/* Critical: when JS sets .hidden=true, the overlay must actually disappear.
   The earlier display:flex declaration could keep these layers visible in
   some theme/browser CSS combinations, even though chart data had loaded. */
.fxea-imm-loading[hidden],
.fxea-imm-empty[hidden]{
  display:none!important;
}

.fxea-imm-loading:not([hidden]),
.fxea-imm-empty:not([hidden]){
  display:flex!important;
}

/* Currency tabs: compact chips instead of full-width giant buttons. */
.fxea-imm-tabs{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  width:100%!important;
  padding:12px 16px!important;
  overflow-x:auto!important;
  border-bottom:1px solid #e3ebf1!important;
  background:#fff!important;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}

.fxea-imm-tabs button{
  position:relative!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:92px!important;
  min-height:38px!important;
  height:38px!important;
  padding:0 12px!important;
  border:1px solid #d8e5ef!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#60778c!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:800!important;
  box-shadow:none!important;
}

.fxea-imm-tabs button::after{
  display:none!important;
}

.fxea-imm-tabs button.is-active{
  border-color:#0878ff!important;
  background:#0878ff!important;
  color:#fff!important;
  box-shadow:0 5px 14px rgba(8,120,255,.14)!important;
}

.fxea-imm-tabs button span{
  margin-right:4px!important;
  font-size:11px!important;
}

/* Period selector: smaller and no longer stretches across most of the page. */
.fxea-imm-periods{
  display:inline-flex!important;
  width:auto!important;
  max-width:100%!important;
  margin:14px 16px 0!important;
  gap:6px!important;
}

.fxea-imm-periods button{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:78px!important;
  min-height:36px!important;
  height:36px!important;
  padding:0 12px!important;
  border:1px solid #c9dceb!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#315d85!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:800!important;
  box-shadow:none!important;
}

.fxea-imm-periods button:first-child,
.fxea-imm-periods button:last-child{
  border-radius:8px!important;
  border-right:1px solid #c9dceb!important;
}

.fxea-imm-periods button.is-active{
  border-color:#0878ff!important;
  background:#eaf5ff!important;
  color:#0878ff!important;
}

/* Don't let fixed-page/theme generic button CSS inflate plugin controls. */
.fxea-fixed-page-content .fxea-imm button,
.fxea-content .fxea-imm button{
  padding-top:0!important;
  padding-bottom:0!important;
}

/* Error state is unobtrusive and only appears after a real fetch failure. */
.fxea-imm-empty{
  background:rgba(255,255,255,.94)!important;
}

@media(hover:hover) and (pointer:fine){
  .fxea-imm-tabs button:hover:not(.is-active),
  .fxea-imm-periods button:hover:not(.is-active){
    border-color:#9fcaf0!important;
    background:#f5faff!important;
    color:#0878ff!important;
  }
}

@media(max-width:760px){
  .fxea-imm-tabs{
    gap:6px!important;
    padding:10px 12px!important;
  }

  .fxea-imm-tabs button{
    min-width:86px!important;
    min-height:36px!important;
    height:36px!important;
    padding:0 10px!important;
    font-size:9px!important;
  }

  .fxea-imm-periods{
    margin:10px 12px 0!important;
    gap:5px!important;
  }

  .fxea-imm-periods button{
    min-width:64px!important;
    min-height:34px!important;
    height:34px!important;
    padding:0 9px!important;
    font-size:9px!important;
  }
}
