/* ═══════════════════════════════════════════════
   TRITON Element Mix Calculator — Page-Specific Styles
   Global design system: ../global.css
   Calculator field patterns adapted from: infusion-dosage-calculator.css
   ═══════════════════════════════════════════════ */


/* ════════════════════════════════════════════════
   HERO — Compact static hero with product image
   ════════════════════════════════════════════════ */
.hero-tool{
  min-height:60vh;height:auto;
  display:flex;flex-direction:column;justify-content:flex-end;
  background:
    radial-gradient(ellipse 70% 55% at 70% 35%, rgba(0,100,102,.3) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 15% 75%, rgba(3,47,79,.5) 0%, transparent 55%),
    var(--bp);
  padding-top:clamp(7rem,12vw,10rem)
}
.hero-tool .hero-ct{
  padding-bottom:clamp(4rem,6vw,6rem);
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:end;
  gap:clamp(2rem,4vw,5rem)
}
.hero-tool .hero-t{font-size:clamp(2.8rem,6.5vw,5.5rem);max-width:18ch}
.hero-tool .hero-sub{max-width:60ch}
.hero-tool-text{min-width:0;align-self:end}
.hero-tool-product{
  position:relative;z-index:2;
  align-self:center;justify-self:center
}
.hero-tool-product img{
  max-height:55vh;width:auto;
  object-fit:contain;
  filter:drop-shadow(0 20px 60px rgba(0,0,0,.5));
  transition:transform .6s cubic-bezier(.16,1,.3,1)
}
.hero-tool-product:hover img{transform:translateY(-8px)}


/* ════════════════════════════════════════════════
   CALCULATOR SHELL — Container
   ════════════════════════════════════════════════ */
.emx-shell{
  max-width:960px;
  background:rgba(1,24,39,.75);
  border:1px solid rgba(133,255,199,.12);
  padding:clamp(2rem,4vw,3rem);
  position:relative;overflow:hidden
}
.emx-shell::before{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,transparent,var(--aq),transparent);
  opacity:.5
}
.emx-shell::after{
  content:'';position:absolute;bottom:0;right:0;
  width:180px;height:180px;
  background:radial-gradient(circle,rgba(133,255,199,.04) 0%,transparent 70%);
  pointer-events:none
}

/* Shell header */
.emx-header{
  display:flex;align-items:center;gap:1rem;
  margin-bottom:2rem;padding-bottom:1.2rem;
  border-bottom:1px solid rgba(133,255,199,.06)
}
.emx-header-icon{
  width:48px;height:48px;
  display:grid;place-items:center;
  background:rgba(133,255,199,.08);
  border:1px solid rgba(133,255,199,.15);
  flex-shrink:0
}
.emx-header-icon i{font-size:1.3rem;color:var(--aq)}
.emx-header-text h3{
  font-family:var(--h);font-weight:900;
  font-size:1.1rem;text-transform:uppercase;
  letter-spacing:.04em;line-height:1.2
}
.emx-header-text span{
  font-size:1rem;color:rgba(255,255,255,.45);
  margin-top:.15rem;display:block
}


/* ════════════════════════════════════════════════
   VOLUME INPUT — Full-width row
   ════════════════════════════════════════════════ */
.emx-volume-row{
  max-width:320px;
  margin-bottom:2rem
}
.emx-field label{
  display:block;
  font-family:var(--h);font-weight:700;
  font-size:.72rem;letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.85);
  margin-bottom:.5rem
}
.emx-field input{
  width:100%;padding:.9rem 1rem;
  background:rgba(1,24,39,.8);
  border:1px solid rgba(133,255,199,.12);
  color:var(--w);font-family:var(--h);
  font-size:1.2rem;font-weight:700;
  letter-spacing:.02em;
  transition:border-color .3s,box-shadow .3s;
  -moz-appearance:textfield
}
.emx-field input::-webkit-outer-spin-button,
.emx-field input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.emx-field input::placeholder{color:rgba(255,255,255,.45)}
.emx-field input:focus{
  outline:none;
  border-color:var(--aq);
  box-shadow:0 0 20px rgba(133,255,199,.08)
}
.emx-field input.invalid{
  border-color:#ff5555;
  box-shadow:0 0 12px rgba(255,85,85,.12)
}
.emx-hint{
  font-size:1rem;color:rgba(255,255,255,.6);
  margin-top:.4rem;line-height:1.4
}


/* ════════════════════════════════════════════════
   SECTION LABEL — "Standard Elements" / divider
   ════════════════════════════════════════════════ */
.emx-section-label{
  display:flex;align-items:center;gap:.8rem;
  margin-bottom:1.5rem;
  padding-bottom:.8rem;
  border-bottom:1px solid rgba(133,255,199,.06)
}
.emx-section-label i{
  color:var(--aq);font-size:1rem;opacity:.6
}
.emx-section-label span{
  font-family:var(--h);font-weight:700;
  font-size:.78rem;letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(255,255,255,.55)
}


/* ════════════════════════════════════════════════
   ELEMENT GRID — Product cards with inputs
   ════════════════════════════════════════════════ */
.emx-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1.5rem;
  margin-bottom:2rem
}

.emx-element-card{
  background:rgba(0,100,102,.06);
  border:1px solid rgba(133,255,199,.08);
  padding:1.2rem;
  display:flex;flex-direction:column;
  align-items:center;gap:.8rem;
  transition:border-color .3s,background .3s
}
.emx-element-card:hover{
  border-color:rgba(133,255,199,.2);
  background:rgba(0,100,102,.1)
}

/* Pro element cards — subtle accent border */
.emx-card-pro{
  border-color:rgba(255,170,85,.12)
}
.emx-card-pro:hover{
  border-color:rgba(255,170,85,.3);
  background:rgba(255,170,85,.04)
}

/* Card image */
.emx-card-img{
  width:200px;height:200px;
  flex-shrink:0
}
.emx-card-img img{
  width:100%;height:100%;
  object-fit:contain;
  filter:drop-shadow(0 4px 12px rgba(0,0,0,.3));
  transition:transform .4s cubic-bezier(.16,1,.3,1)
}
.emx-element-card:hover .emx-card-img img{
  transform:scale(1.06)
}

/* Card body */
.emx-card-body{
  width:100%;text-align:center
}
.emx-card-body h4{
  font-family:var(--h);font-weight:900;
  font-size:.88rem;text-transform:uppercase;
  letter-spacing:.04em;line-height:1.3;
  margin-bottom:.6rem
}
.emx-symbol{
  font-weight:400;
  color:var(--aq);
  font-size:.82rem
}

/* Card field */
.emx-card-field{
  width:100%
}
.emx-card-field label{
  display:block;
  font-family:var(--h);font-weight:700;
  font-size:.72rem;letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.7);
  margin-bottom:.35rem
}

/* Input with unit */
.emx-input-wrap{
  display:flex;align-items:stretch;
  border:1px solid rgba(133,255,199,.12);
  background:rgba(1,24,39,.8);
  transition:border-color .3s,box-shadow .3s
}
.emx-input-wrap:focus-within{
  border-color:var(--aq);
  box-shadow:0 0 20px rgba(133,255,199,.08)
}
.emx-dose-input{
  flex:1;min-width:0;
  padding:.6rem .7rem;
  background:none;border:none;
  color:var(--w);font-family:var(--h);
  font-size:1.05rem;font-weight:700;
  letter-spacing:.02em;
  text-align:center;
  -moz-appearance:textfield
}
.emx-dose-input::-webkit-outer-spin-button,
.emx-dose-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.emx-dose-input::placeholder{color:rgba(255,255,255,.3)}
.emx-dose-input:focus{outline:none}
.emx-dose-input.invalid{color:#ff5555}
.emx-input-wrap:has(.emx-dose-input.invalid){
  border-color:#ff5555;
  box-shadow:0 0 12px rgba(255,85,85,.12)
}

.emx-unit{
  display:flex;align-items:center;
  padding:0 .7rem;
  font-family:var(--h);font-weight:700;
  font-size:.78rem;letter-spacing:.06em;
  color:rgba(255,255,255,.4);
  background:rgba(133,255,199,.04);
  border-left:1px solid rgba(133,255,199,.08)
}

/* Max limit label */
.emx-limit-label{
  font-size:.82rem;
  color:rgba(255,255,255,.4);
  margin-top:.35rem;
  text-align:center;
  line-height:1.3
}
.emx-limit-val{
  color:var(--aq);
  font-weight:700
}


/* ════════════════════════════════════════════════
   PRO TOGGLE — Switch for experienced aquarists
   ════════════════════════════════════════════════ */
.emx-pro-toggle{
  margin-bottom:2rem
}
.emx-pro-btn{
  display:flex;align-items:center;gap:1rem;
  width:100%;padding:1rem 1.4rem;
  background:rgba(255,170,85,.04);
  border:1px solid rgba(255,170,85,.12);
  cursor:pointer;
  transition:all .35s
}
.emx-pro-btn:hover{
  background:rgba(255,170,85,.08);
  border-color:rgba(255,170,85,.25)
}

/* Toggle switch */
.emx-pro-switch{
  width:44px;height:24px;
  background:rgba(255,255,255,.12);
  border-radius:12px;
  position:relative;
  flex-shrink:0;
  transition:background .3s
}
.emx-pro-knob{
  position:absolute;
  top:3px;left:3px;
  width:18px;height:18px;
  background:rgba(255,255,255,.6);
  border-radius:50%;
  transition:all .3s cubic-bezier(.16,1,.3,1)
}
.emx-pro-btn.active .emx-pro-switch{
  background:rgba(255,170,85,.5)
}
.emx-pro-btn.active .emx-pro-knob{
  left:23px;
  background:#ffaa55
}

.emx-pro-label{
  font-family:var(--h);font-weight:700;
  font-size:.82rem;letter-spacing:.06em;
  text-transform:uppercase;
  color:rgba(255,255,255,.6);
  flex:1;text-align:left
}
.emx-pro-btn.active .emx-pro-label{
  color:rgba(255,170,85,.9)
}
.emx-pro-btn i{
  color:rgba(255,170,85,.5);
  font-size:1.1rem;
  flex-shrink:0
}
.emx-pro-btn.active i{
  color:rgba(255,170,85,.9)
}


/* ════════════════════════════════════════════════
   PRO SECTION — Warning + grid
   ════════════════════════════════════════════════ */
.emx-pro-section[hidden]{display:none}

.emx-pro-warning{
  display:flex;align-items:flex-start;gap:1rem;
  padding:1.2rem 1.5rem;
  margin-bottom:1.5rem;
  background:rgba(255,85,85,.06);
  border:1px solid rgba(255,85,85,.2);
  border-left:3px solid rgba(255,85,85,.6)
}
.emx-pro-warning i{
  flex-shrink:0;color:#ff5555;
  font-size:1.1rem;margin-top:.15rem
}
.emx-pro-warning p{
  font-size:1rem;line-height:1.6;
  color:rgba(255,255,255,.8)
}

.emx-grid-pro{
  margin-bottom:2rem
}


/* ════════════════════════════════════════════════
   CALCULATE BUTTON — Full-width emphasis
   ════════════════════════════════════════════════ */
.emx-calculate-btn{
  width:100%;
  margin-bottom:1.5rem;
  font-size:1rem;
  padding:1.15em 2.8em
}


/* ════════════════════════════════════════════════
   VALIDATION — Error messages
   ════════════════════════════════════════════════ */
.emx-validation{
  display:flex;align-items:flex-start;gap:1rem;
  padding:1.2rem 1.5rem;
  background:rgba(255,85,85,.06);
  border:1px solid rgba(255,85,85,.15);
  border-left:3px solid rgba(255,85,85,.5);
  margin-bottom:1.5rem
}
.emx-validation[hidden]{display:none}
.emx-validation>i{
  flex-shrink:0;color:#ff5555;
  font-size:1.1rem;margin-top:.15rem
}
.emx-validation-title{
  font-family:var(--h);font-weight:700;
  font-size:1rem;
  color:rgba(255,255,255,.85);
  margin-bottom:.5rem
}
.emx-validation-list{
  list-style:disc;
  padding-left:1.2rem
}
.emx-validation-list li{
  font-size:1rem;line-height:1.6;
  color:rgba(255,255,255,.65);
  list-style:disc
}


/* ════════════════════════════════════════════════
   RECIPE — Output display
   ════════════════════════════════════════════════ */
.emx-recipe{
  background:rgba(0,100,102,.12);
  border:1px solid rgba(133,255,199,.18);
  padding:clamp(1.5rem,3vw,2.5rem);
  position:relative;
  margin-top:1.5rem;
  animation:recipeIn .5s ease-out
}
.emx-recipe[hidden]{display:none}
.emx-recipe::before{
  content:'';position:absolute;left:0;top:0;bottom:0;
  width:3px;background:var(--aq)
}

@keyframes recipeIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}

.emx-recipe-header{
  display:flex;align-items:center;gap:.8rem;
  margin-bottom:1.2rem;
  padding-bottom:1rem;
  border-bottom:1px solid rgba(133,255,199,.1)
}
.emx-recipe-header i{
  color:var(--aq);font-size:1.2rem
}
.emx-recipe-header h3{
  font-family:var(--h);font-weight:900;
  font-size:1rem;text-transform:uppercase;
  letter-spacing:.06em
}

.emx-recipe-intro{
  font-size:1rem;line-height:1.6;
  color:rgba(255,255,255,.7);
  margin-bottom:1.2rem
}

.emx-recipe-list{
  list-style:none;
  counter-reset:recipe;
  padding:0;margin-bottom:1.5rem
}
.emx-recipe-list li{
  counter-increment:recipe;
  display:flex;align-items:baseline;gap:.8rem;
  padding:.6rem 0;
  border-bottom:1px solid rgba(133,255,199,.06);
  font-size:1rem;line-height:1.5;
  color:rgba(255,255,255,.75)
}
.emx-recipe-list li::before{
  content:counter(recipe) '.';
  font-family:var(--h);font-weight:900;
  font-size:.82rem;
  color:var(--aq);
  min-width:1.8rem;flex-shrink:0
}
.emx-recipe-list li strong{
  color:var(--aq);font-family:var(--h);
  font-weight:900
}

/* Recipe summary stats */
.emx-recipe-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
  padding-top:1rem;
  border-top:1px solid rgba(133,255,199,.1)
}
.emx-recipe-stat{
  padding:1rem 1.2rem;
  background:rgba(1,24,39,.6)
}
.emx-recipe-stat-label{
  font-family:var(--h);font-weight:700;
  font-size:.72rem;letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.55);
  margin-bottom:.3rem
}
.emx-recipe-stat-value{
  font-family:var(--h);font-weight:900;
  font-size:clamp(1.6rem,3vw,2rem);
  color:var(--aq);letter-spacing:-.01em;
  line-height:1.2
}
.emx-recipe-stat-unit{
  font-size:1rem;color:rgba(255,255,255,.6);
  font-weight:400
}


/* ════════════════════════════════════════════════
   MODAL — Max dosage warning
   ════════════════════════════════════════════════ */
.emx-modal-overlay{
  position:fixed;top:0;left:0;
  width:100%;height:100%;
  z-index:200;
  background:rgba(1,24,39,.85);
  backdrop-filter:blur(12px);
  display:flex;align-items:center;justify-content:center;
  padding:2rem;
  animation:modalFadeIn .3s ease-out
}
.emx-modal-overlay[hidden]{display:none}

@keyframes modalFadeIn{
  from{opacity:0}to{opacity:1}
}

.emx-modal{
  max-width:540px;width:100%;
  background:rgba(3,47,79,.95);
  border:1px solid rgba(255,170,85,.3);
  padding:clamp(2rem,4vw,3rem);
  position:relative
}
.emx-modal::before{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,transparent,#ffaa55,transparent);
  opacity:.7
}

.emx-modal-header{
  display:flex;align-items:center;gap:1rem;
  margin-bottom:1.5rem
}
.emx-modal-header i{
  color:#ffaa55;font-size:1.4rem;flex-shrink:0
}
.emx-modal-header h3{
  font-family:var(--h);font-weight:900;
  font-size:1.1rem;text-transform:uppercase;
  letter-spacing:.04em;line-height:1.3
}

.emx-modal-body{
  font-size:1rem;line-height:1.7;
  color:rgba(255,255,255,.75);
  margin-bottom:2rem
}

.emx-modal-close{
  width:100%
}


/* ════════════════════════════════════════════════
   DISCLAIMER — Safety section
   ════════════════════════════════════════════════ */
.emx-disclaimer{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:clamp(2rem,4vw,3rem);
  align-items:start
}
.emx-disclaimer-icon{
  width:64px;height:64px;
  display:grid;place-items:center;
  background:rgba(133,255,199,.06);
  border:1px solid rgba(133,255,199,.12);
  flex-shrink:0
}
.emx-disclaimer-icon i{
  font-size:1.6rem;color:var(--aq)
}
.emx-disclaimer-content .section-ey{margin-bottom:.5rem}
.emx-disclaimer-content .section-h{margin-bottom:1rem}
.emx-disclaimer-content .section-body{margin-bottom:1rem}
.emx-disclaimer-content .section-body:last-child{margin-bottom:0}


/* ════════════════════════════════════════════════
   EXPERT QUOTE — Below calculator
   ════════════════════════════════════════════════ */
.emx-quote{margin-top:clamp(2.5rem,5vw,3.5rem);max-width:960px}


/* ════════════════════════════════════════════════
   CTA — Final conversion section
   ════════════════════════════════════════════════ */
.emx-cta{
  background:linear-gradient(180deg,var(--bp) 0%,rgba(0,100,102,.25) 50%,var(--bp) 100%);
  text-align:center;
  position:relative
}
.emx-cta::before{
  content:'';position:absolute;inset:0;pointer-events:none;opacity:.03;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 1l27 15.5v31L28 63 1 47.5v-31z' fill='none' stroke='%2385FFC7' stroke-width='.4'/%3E%3C/svg%3E");
  background-size:56px 97px
}
.emx-cta .section-h{margin-bottom:1rem}
.emx-cta .s-sub{margin-bottom:clamp(2rem,4vw,3rem)}
.emx-cta-btns{
  display:flex;gap:1.2rem;
  justify-content:center;flex-wrap:wrap
}
.emx-cta-sub{max-width:55ch;margin-left:auto;margin-right:auto}


/* ════════════════════════════════════════════════
   RESPONSIVE — Tablet (<=1024px)
   ════════════════════════════════════════════════ */
@media(max-width:1024px){
  .hero-tool .hero-ct{grid-template-columns:1fr}
  .hero-tool-product{justify-self:start;order:-1;margin-bottom:1.5rem}
  .hero-tool-product img{max-height:none;width:min(60vw,320px);height:auto}

  .emx-grid{grid-template-columns:repeat(2,1fr)}
  .emx-card-img{width:160px;height:160px}
  .emx-disclaimer{grid-template-columns:1fr;text-align:center}
  .emx-disclaimer-icon{margin:0 auto}
}

/* ════════════════════════════════════════════════
   RESPONSIVE — Mobile (<=768px)
   ════════════════════════════════════════════════ */
@media(max-width:768px){
  .hero-tool{min-height:auto;padding-top:clamp(6rem,10vw,8rem)}
  .hero-tool .hero-ct{padding-bottom:clamp(3rem,5vw,4rem)}
  .hero-tool-product img{width:min(50vw,280px)}

  .emx-grid{grid-template-columns:1fr;gap:1.2rem}

  /* Stack: image block on top, form below */
  .emx-element-card{
    flex-direction:column;align-items:center;
    gap:1rem;padding:1.5rem
  }
  .emx-card-img{width:140px;height:140px}
  .emx-card-body{width:100%;text-align:center}
  .emx-card-body h4{margin-bottom:.6rem}

  .emx-pro-btn{flex-wrap:wrap;gap:.8rem}
  .emx-pro-label{font-size:.76rem}

  .emx-recipe-summary{grid-template-columns:1fr}

  .emx-cta-btns{flex-direction:column;align-items:center}
  .emx-cta-btns .btn{width:100%}
}

/* ════════════════════════════════════════════════
   RESPONSIVE — Small mobile (<=480px)
   ════════════════════════════════════════════════ */
@media(max-width:480px){
  .emx-shell{padding:1.5rem}
  .emx-header{flex-direction:column;align-items:flex-start;gap:.8rem}

  .emx-card-img{width:120px;height:120px}

  .emx-pro-warning{flex-direction:column;gap:.6rem}

  .emx-modal{padding:1.5rem}
  .emx-modal-header{flex-direction:column;align-items:flex-start;gap:.6rem}
}


/* ════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════ */
@media(prefers-reduced-motion:reduce){
  .emx-element-card,
  .emx-card-img img,
  .emx-pro-switch,
  .emx-pro-knob,
  .emx-pro-btn{
    transition:none
  }
  @keyframes recipeIn{from{opacity:1;transform:none}to{opacity:1;transform:none}}
  @keyframes modalFadeIn{from{opacity:1}to{opacity:1}}
}
