/* =========================================================================
   MO Global — My Coaching (My Account endpoint)
   Uses the theme :root tokens defined in style.css. All classes mo- prefixed.
   ========================================================================= */

/* ---- Menu tab icon (Bootstrap Icons via ::before) --------------------- */
.woocommerce-account .woocommerce-MyAccount-navigation-link--coaching a{
  display:inline-flex;align-items:center;gap:.5em;
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--coaching a::before{
  content:"\f71f"; /* bi-clipboard-heart */
  font-family:"bootstrap-icons" !important;
  font-weight:400;
  font-style:normal;
  line-height:1;
  font-size:1.05em;
  vertical-align:-.125em;
}

/* ---- Layout ----------------------------------------------------------- */
.mo-coach{
  display:grid;
  gap:clamp(2rem,4vw,3rem);
}
.mo-coach-block__head{margin-bottom:1.25rem;}
.mo-coach-block__title{
  font-family:var(--font-display);
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:-.01em;
  line-height:.95;
  font-size:clamp(1.6rem,3vw,2.25rem);
  margin:0;
  color:var(--fg);
}

/* ---- Active plan card ------------------------------------------------- */
.mo-coach-plan{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  gap:clamp(1.25rem,3vw,2.5rem);
  justify-content:space-between;
  align-items:center;
  padding:clamp(1.4rem,3vw,2rem);
  border-radius:var(--r-lg);
  background:var(--ink);
  color:var(--on-ink);
  border:1px solid var(--border-dark);
  overflow:hidden;
}
.mo-coach-plan::before{
  /* lime accent corner-wipe */
  content:"";
  position:absolute;top:0;right:0;
  width:min(45%,240px);height:100%;
  background:radial-gradient(120% 120% at 100% 0%, rgba(193,251,82,.18), transparent 60%);
  pointer-events:none;
}
.mo-coach-plan__main{position:relative;z-index:1;min-width:min(100%,260px);}
.mo-coach-plan__tier{
  display:inline-flex;align-items:center;gap:.4em;
  font-family:var(--font-display);
  font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  font-size:.8rem;
  padding:.4em .8em;border-radius:var(--r-pill);
  background:var(--ink-700);color:var(--on-ink);
}
.mo-coach-plan__tier i{color:var(--lime);}
.mo-coach-plan--elite .mo-coach-plan__tier{background:var(--lime);color:var(--on-lime);}
.mo-coach-plan--elite .mo-coach-plan__tier i{color:var(--on-lime);}
.mo-coach-plan--pro .mo-coach-plan__tier{background:var(--lime-200);color:var(--on-lime);}
.mo-coach-plan--pro .mo-coach-plan__tier i{color:var(--on-lime);}
.mo-coach-plan__name{
  font-family:var(--font-display);
  font-weight:800;text-transform:uppercase;letter-spacing:-.01em;line-height:.95;
  font-size:clamp(1.8rem,4vw,2.75rem);
  margin:.5rem 0 .4rem;
  color:var(--on-ink);
}
.mo-coach-plan__price{
  font-family:var(--font-body);
  font-weight:700;
  font-size:1.2rem;
  color:var(--on-ink);
  font-variant-numeric:tabular-nums;
}
.mo-coach-plan__price .amount{font-weight:700;}
.mo-coach-plan__renew{
  font-family:var(--font-body);
  font-weight:500;
  font-size:.85rem;
  color:var(--on-ink-muted);
  letter-spacing:0;
  text-transform:none;
}

.mo-coach-plan__meta{
  position:relative;z-index:1;
  display:flex;flex-wrap:wrap;gap:1.25rem 2rem;
  margin:0;
}
.mo-coach-plan__meta div{display:flex;flex-direction:column;gap:.25rem;}
.mo-coach-plan__meta dt{
  font-family:var(--font-body);
  font-weight:600;text-transform:uppercase;letter-spacing:.14em;
  font-size:.7rem;color:var(--on-ink-muted);
}
.mo-coach-plan__meta dd{
  margin:0;
  font-family:var(--font-display);
  font-weight:700;text-transform:uppercase;letter-spacing:.02em;
  font-size:1.05rem;color:var(--on-ink);
  display:flex;align-items:center;gap:.4em;
}
.mo-coach-plan__meta dd a{color:var(--lime);}
.mo-coach-plan__meta dd a:hover{text-decoration:underline;}
.mo-coach-dot{
  width:9px;height:9px;border-radius:50%;
  background:var(--success);
  box-shadow:0 0 0 4px rgba(39,178,75,.2);
  display:inline-block;
}

/* ---- Empty states ----------------------------------------------------- */
.mo-coach-empty{
  text-align:center;
  padding:clamp(2rem,5vw,3.5rem) 1.5rem;
  border:1.5px dashed var(--border);
  border-radius:var(--r-lg);
  background:var(--paper-2);
}
.mo-coach-empty > i{
  font-size:2.5rem;color:var(--fg-dim);
  display:block;margin-bottom:.75rem;
}
.mo-coach-empty h3{
  font-family:var(--font-display);
  font-weight:800;text-transform:uppercase;letter-spacing:-.01em;
  font-size:clamp(1.3rem,2.5vw,1.75rem);
  margin:0 0 .5rem;color:var(--fg);
}
.mo-coach-empty p{
  color:var(--fg-muted);
  max-width:44ch;margin:0 auto 1.5rem;
}
.mo-coach-empty--inline{
  padding:2rem 1.5rem;
}
.mo-coach-empty--inline p{margin-bottom:0;}

/* ---- Progress form ---------------------------------------------------- */
.mo-coach-form{
  padding:clamp(1.25rem,3vw,1.75rem);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  background:#fff;
  box-shadow:var(--shadow);
  margin-bottom:1.75rem;
}
.mo-coach-form__grid{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
}
.mo-coach-field{display:flex;flex-direction:column;gap:.4rem;}
.mo-coach-field > span{
  font-family:var(--font-body);
  font-weight:600;text-transform:uppercase;letter-spacing:.12em;
  font-size:.7rem;color:var(--fg-muted);
}
.mo-coach-field input{
  width:100%;
  padding:.75rem .9rem;
  border:1.5px solid var(--border);
  border-radius:var(--r);
  background:var(--paper);
  color:var(--fg);
  font-size:1rem;
  transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease);
}
.mo-coach-field input:focus{
  outline:none;
  border-color:var(--lime-600);
  box-shadow:0 0 0 3px rgba(193,251,82,.35);
}
.mo-coach-form__foot{
  display:flex;align-items:center;gap:1rem;flex-wrap:wrap;
  margin-top:1.1rem;
}
.mo-coach-form__submit.is-busy{opacity:.7;pointer-events:none;}
.mo-coach-form__msg{
  margin:0;font-size:.9rem;font-weight:500;
}
.mo-coach-form__msg.is-ok{color:var(--success);}
.mo-coach-form__msg.is-error{color:var(--sale);}

/* ---- Stat tiles ------------------------------------------------------- */
.mo-coach-stats{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:.75rem;
  margin-bottom:1.5rem;
}
.mo-coach-stat{
  padding:1rem 1.1rem;
  border:1px solid var(--border);
  border-radius:var(--r);
  background:var(--paper-2);
  display:flex;flex-direction:column;gap:.2rem;
}
.mo-coach-stat__label{
  font-family:var(--font-body);
  font-weight:600;text-transform:uppercase;letter-spacing:.14em;
  font-size:.68rem;color:var(--fg-muted);
}
.mo-coach-stat__num{
  font-family:var(--font-impact);
  font-size:clamp(1.6rem,4vw,2.2rem);
  line-height:1;
  color:var(--fg);
  letter-spacing:.01em;
}
.mo-coach-stat__num small{
  font-family:var(--font-body);
  font-size:.85rem;font-weight:600;
  color:var(--fg-muted);margin-left:.15em;
}
.mo-coach-stat__sub{
  font-size:.75rem;color:var(--fg-dim);
  display:flex;align-items:center;gap:.3em;
}
.mo-coach-stat--delta.mo-coach-stat--down{background:rgba(39,178,75,.1);border-color:rgba(39,178,75,.35);}
.mo-coach-stat--delta.mo-coach-stat--down .mo-coach-stat__num{color:var(--success);}
.mo-coach-stat--delta.mo-coach-stat--up .mo-coach-stat__num{color:var(--fg);}

/* ---- Sparkline -------------------------------------------------------- */
.mo-coach-spark-wrap{
  position:relative;
  padding:1rem 1.1rem;
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  background:var(--ink);
  margin-bottom:1.5rem;
}
.mo-coach-spark{
  display:block;
  width:100%;height:clamp(120px,22vw,180px);
}
.mo-coach-spark__area{fill:rgba(193,251,82,.14);}
.mo-coach-spark__line{
  stroke:var(--lime);
  stroke-width:2.5;
  stroke-linejoin:round;
  stroke-linecap:round;
  vector-effect:non-scaling-stroke;
}
.mo-coach-spark__dot{fill:var(--lime);}
.mo-coach-spark__dot--last{fill:#fff;stroke:var(--lime);stroke-width:3;vector-effect:non-scaling-stroke;}
.mo-coach-spark-axis{
  display:flex;justify-content:space-between;
  margin-top:.5rem;
  font-family:var(--font-body);
  font-size:.72rem;font-weight:600;letter-spacing:.08em;
  color:var(--on-ink-muted);
}

/* ---- Log table -------------------------------------------------------- */
.mo-coach-table-wrap{overflow-x:auto;}
.mo-coach-table{
  width:100%;
  border-collapse:collapse;
  font-size:.95rem;
}
.mo-coach-table th{
  text-align:left;
  font-family:var(--font-body);
  font-weight:600;text-transform:uppercase;letter-spacing:.12em;
  font-size:.68rem;color:var(--fg-muted);
  padding:.6rem .75rem;
  border-bottom:2px solid var(--border);
}
.mo-coach-table td{
  padding:.75rem;
  border-bottom:1px solid var(--border);
  color:var(--fg);
  font-variant-numeric:tabular-nums;
}
.mo-coach-table tbody tr:last-child td{border-bottom:0;}
.mo-coach-muted{color:var(--fg-dim);}

/* ---- Responsive ------------------------------------------------------- */
@media (min-width:768px){
  .mo-coach-form__grid{grid-template-columns:repeat(3,1fr);}
  .mo-coach-field--note{grid-column:span 3;}
  .mo-coach-stats{grid-template-columns:repeat(4,1fr);}
}

/* Stacked, label-prefixed table on very small screens */
@media (max-width:520px){
  .mo-coach-table thead{
    position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
  }
  .mo-coach-table,.mo-coach-table tbody,.mo-coach-table tr,.mo-coach-table td{
    display:block;width:100%;
  }
  .mo-coach-table tr{
    border:1px solid var(--border);border-radius:var(--r);
    padding:.5rem .75rem;margin-bottom:.6rem;
  }
  .mo-coach-table td{
    border:0;padding:.3rem 0;
    display:flex;justify-content:space-between;gap:1rem;
  }
  .mo-coach-table td::before{
    content:attr(data-label);
    font-weight:600;text-transform:uppercase;letter-spacing:.1em;
    font-size:.68rem;color:var(--fg-muted);
  }
}

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  .mo-coach-field input,
  .mo-coach-form__submit{transition:none;}
}
