/* ========================================================================
   FMF CORE CSS
   ------------------------------------------------------------------------
   Purpose:
   - Global FMF design tokens
   - Reusable card/button/badge systems
   - Sidebar navigation
   - Popup shell styling
   - Shared utility/pattern classes

   Notes:
   - This file should load on all FMF pages.
   - Keep Formidable-specific field styling OUT of this file.
   - Keep login/register/onboarding layout OUT of this file.
   - Keep dashboard-specific card layouts OUT of this file.
======================================================================== */

/* ========================================================================
   1. DESIGN TOKENS
======================================================================== */

:root{
  --fmf-shell-dark: #0F1B2D;
  --fmf-card-dark: #1E2A3A;
  --fmf-card-dark-2: #233246;
  --fmf-border-dark: rgba(255,255,255,0.08);

  --fmf-text-dark: rgba(255,255,255,0.90);
  --fmf-text-muted-dark: rgba(255,255,255,0.62);
  --fmf-text-faint-dark: rgba(255,255,255,0.40);

  --fmf-cyan: #2FB3E6;
  --fmf-blue: #1F6FB2;
  --fmf-orange: rgba(255,106,43,0.95);
  --fmf-orange-soft: rgba(255,106,43,0.22);

  --fmf-track: rgba(255,255,255,0.10);
  --fmf-track-2: rgba(255,255,255,0.06);
}

/* ========================================================================
   2. GLOBAL CARD SYSTEM
   ------------------------------------------------------------------------
   Canonical reusable surface for FMF cards.
======================================================================== */

.fmf-card{
  font-size: 14px;
  background: #ffffff;
  color: #0c2139;
  border-radius: 16px;
  border: 1px solid rgba(12, 33, 57, 0.10);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  padding: 18px;
  overflow: hidden;
  box-sizing: border-box;
}

.fmf-card p{
  margin: 0;
}

/* ========================================================================
   3. SHARED ROWS / LABELS / VALUES / BADGES
======================================================================== */

.fmf-row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.fmf-label{
  opacity: .7;
}

.fmf-value{
  text-align: right;
}

.fmf-card hr{
  margin: 10px 0;
  opacity: .15;
}

.fmf-value-big{
  font-size: 18px;
  font-weight: 700;
}

.fmf-value-strong{
  font-weight: 600;
}

.fmf-badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

/* ========================================================================
   4. SHARED PILL / STATUS SYSTEM
======================================================================== */

.fmf-workout-pill{
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.55);
}

.fmf-workout-Yes{
  background: rgba(0,128,0,0.10);
  color: rgba(0,128,0,0.95);
}

.fmf-win-pill{
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.60);
}

.fmf-win-1{
  background: rgba(0,128,0,0.10);
  color: rgba(0,128,0,0.95);
}

.fmf-delta-pill{
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.55);
}

.fmf-delta-1{
  background: rgba(0,128,0,0.10);
  color: rgba(0,128,0,0.95);
}
.fmf-delta-1::before{
  content: "Under by ";
}

.fmf-delta-2{
  background: rgba(200,0,0,0.08);
  color: rgba(160,0,0,0.95);
}
.fmf-delta-2::before{
  content: "Over by ";
}

.fmf-delta-0{
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.55);
}
.fmf-delta-0::before{
  content: "On target";
}

.fmf-delta-0 .fmf-delta-abs{
  display: none;
}

.fmf-delta-abs{
  margin-left: 2px;
}

.fmf-type-pill{
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.65);
}
.fmf-type-pill::before{
  content: "—";
}

.fmf-strength-pill{
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.60);
}
.fmf-strength-pill::before{
  content: "No";
}

.fmf-strength-1{
  background: rgba(0,128,0,0.10);
  color: rgba(0,128,0,0.95);
}
.fmf-strength-1::before{
  content: "Yes";
}

.fmf-type-1::before{ content: "Push"; }
.fmf-type-2::before{ content: "Pull"; }
.fmf-type-3::before{ content: "Legs"; }
.fmf-type-4::before{ content: "Full"; }
.fmf-type-5::before{ content: "Conditioning"; }

/* ========================================================================
   5. SHARED EMPTY STATES
   Global dark-theme defaults for FMF
======================================================================== */

.fmf-empty-state{
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 28px 22px;
}

.fmf-empty-title{
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.90);
  margin-bottom: 8px;
}

.fmf-empty-sub{
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255,255,255,0.54);
  margin-bottom: 16px;
}

.fmf-empty-hint{
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255,255,255,0.36);
  margin-top: 10px;
}

.fmf-empty-state .fmf-empty-wrap{
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  padding: 14px 12px;
  margin-top: 4px;
}

.fmf-empty-text{
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255,255,255,0.48);
}

/* ========================================================================
   6. SHARED BUTTON SYSTEM
======================================================================== */

.fmf-btn,
.fmf-btn *{
  line-height: 1 !important;
}

.fmf-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  padding: 0 14px !important;
  vertical-align: middle !important;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none !important;
  gap: 8px;
}

.fmf-btn-primary{
  background: #5B6672;
  color: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
}

.fmf-btn-primary:hover{
  background: #47525D;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.18);
}

.fmf-btn-primary:active{
  transform: translateY(0);
}

.fmf-pill-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 36px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 4px solid rgba(47,179,230,0.40) !important;
  color: rgba(255,255,255,0.92) !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.fmf-pill-btn *{
  line-height: 1 !important;
}

.fmf-pill-btn:hover{
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(47,179,230,0.55) !important;
}

/* ========================================================================
   7. CHART SHARED WRAPPERS
======================================================================== */

.fmf-chart-card{
  display: flex;
  flex-direction: column;
}

.fmf-chart-head{
  margin-bottom: 8px;
}

.fmf-chart-title{
  font-weight: 900;
  font-size: 16px;
  line-height: 1.15;
  margin: 0;
}

.fmf-chart-sub{
  margin-top: 2px;
  font-weight: 700;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}

.fmf-chart-wrap{
  position: relative;
  height: 220px;
}

.fmf-chart-wrap canvas{
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.fmf-chart-note{
  font-size: 13px;
  color: #64748b;
  margin: 6px 0 10px;
  line-height: 1.35;
}

.fmf-balance-note-line{
  display: block;
  margin: 0 0 2px;
}

.fmf-balance-note-muted{
  white-space: nowrap;
}

/* ========================================================================
   8. SIDEBAR NAVIGATION
   ------------------------------------------------------------------------
   This is the cleaned, final sidebar block.
======================================================================== */

.fmf-sidebar-nav{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 10px;
  box-sizing: border-box;
}

.fmf-sidebar-nav a,
.fmf-sidebar-nav a:visited,
.fmf-sidebar-nav a:hover,
.fmf-sidebar-nav a:active,
.fmf-sidebar-nav a:focus{
  color: rgba(255,255,255,0.82) !important;
  text-decoration: none !important;
}

.fmf-nav-section{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fmf-nav-title{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin: 8px 8px 6px;
}

.fmf-nav-divider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 8px 6px;
}

.fmf-nav-item{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255,255,255,0.82) !important;
  background: transparent;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .08s ease;
}

.fmf-nav-item:hover,
.fmf-nav-item:focus{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,106,43,0.25);
  color: rgba(255,255,255,0.96) !important;
}

.fmf-nav-icon{
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: inherit;
  opacity: 1;
}

.fmf-nav-icon svg{
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  display: block;
}

.fmf-sidebar-nav svg,
.fmf-sidebar-nav svg *{
  vector-effect: non-scaling-stroke;
}

.fmf-nav-text{
  flex: 1 1 auto;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  color: inherit;
}

.fmf-nav-badge{
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  line-height: 1;
  white-space: nowrap;
}

.fmf-nav-item.is-disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.fmf-nav-item.is-disabled:hover{
  background: transparent;
  border-color: transparent;
  transform: none;
}

.fmf-nav-item.is-active{
  position: relative;
  background: rgba(255,106,43,0.12);
  border-color: rgba(255,106,43,0.28);
  color: rgba(255,255,255,0.96) !important;
}

.fmf-nav-item.is-active .fmf-nav-icon{
  color: rgba(255,106,43,0.95);
}

.fmf-nav-item.is-active::before{
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 8px;
  background: rgba(255,106,43,0.90);
}

/* ========================================================================
   9. POPUP SHELL
   ------------------------------------------------------------------------
   Global popup container styling. Formidable field-level styling belongs
   in Formidable Global CSS.
======================================================================== */

.fmf-popup .dialog-widget-content{
  background: #0b1422 !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 18px !important;
  box-shadow: 0 25px 80px rgba(0,0,0,0.55) !important;
}

.elementor-popup-modal .dialog-overlay{
  background: rgba(0,0,0,0.72) !important;
}

.fmf-popup .dialog-close-button{
  color: rgba(255,255,255,0.95) !important;
  font-size: 11px !important;
  opacity: 1 !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,0.45) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  display: grid !important;
  place-items: center !important;
  top: 14px !important;
  right: 14px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45) !important;
}

.fmf-popup .dialog-close-button:hover{
  background: rgba(65,153,253,0.18) !important;
  border-color: rgba(65,153,253,0.45) !important;
  box-shadow: 0 0 0 3px rgba(65,153,253,0.16), 0 12px 28px rgba(0,0,0,0.55) !important;
}

.fmf-popup .dialog-close-button i,
.fmf-popup .dialog-close-button svg{
  fill: currentColor !important;
  color: currentColor !important;
}

/* ========================================================================
   10. SHARED RESPONSIVE UTILITIES
======================================================================== */

@media (max-width: 680px){
  .fmf-btn{
    width: 100%;
  }
}

/* ========================================================================
   11. HEADER MENU
======================================================================== */

.fmf-header-actions{
	display:flex;
	align-items:center;
	justify-content:flex-end;
	gap:20px;
	flex-wrap:nowrap;
}

.fmf-header-link{
	color:#F4F8FC;
	text-decoration:none;
	font-size:16px;
	font-weight:500;
	line-height:1;
	transition:color .2s ease, opacity .2s ease;
}

.fmf-header-link:hover{
	color:#67D4FF;
}

.fmf-header-btn{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	padding:9px 16px;
	border-radius:999px;
	text-decoration:none;
	font-size:14px;
	font-weight:700;
	line-height:1;
	color:#081421;
	background:linear-gradient(135deg, #1FB6FF 0%, #0EA5E9 100%);
	box-shadow:0 6px 16px rgba(31,182,255,0.16);
	transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.fmf-header-btn:hover{
	transform:translateY(-1px);
	box-shadow:0 8px 20px rgba(31,182,255,0.22);
	color:#081421;
}

@media (max-width: 767px){
	.fmf-header-actions{
		gap:14px;
	}

	.fmf-header-link{
		font-size:15px;
	}

	.fmf-header-btn{
		padding:8px 14px;
		font-size:13px;
	}
}

.fmf-site-header{
  position: sticky;
  top: 0;
  z-index: 999;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.fmf-site-header.is-scrolled{
  background: rgba(8,20,33,0.82);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fmf-site-header .fmf-header-inner{
  min-height: 72px;
  transition: min-height 0.25s ease, padding 0.25s ease;
}

.fmf-site-header.is-scrolled .fmf-header-inner{
  min-height: 60px;
}

/* ========================================================================
   12. HERO BUTTON DYNAMIC SHORTCODE
======================================================================== */

.fmf-hero-ctas{
	display:flex;
	align-items:center;
	gap:16px;
	flex-wrap:wrap;
}

.fmf-hero-btn{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	text-decoration:none;
	border-radius:999px;
	font-weight:700;
	line-height:1;
	transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
}

.fmf-hero-btn-primary{
	padding:18px 28px;
	font-size:16px;
	color:#F4F8FC;
	background:linear-gradient(135deg, #1FB6FF 0%, #3B82F6 100%);
	box-shadow:0 10px 26px rgba(31,182,255,0.20);
}

.fmf-hero-btn-primary:hover{
	transform:translateY(-1px);
	box-shadow:0 12px 30px rgba(31,182,255,0.24);
	color:#F4F8FC;
}

.fmf-hero-btn-secondary{
	padding:18px 28px;
	font-size:16px;
	color:#F4F8FC;
	background:rgba(255,255,255,0.02);
	border:1px solid rgba(111,191,255,0.18);
}

.fmf-hero-btn-secondary:hover{
	transform:translateY(-1px);
	border-color:rgba(111,191,255,0.28);
	color:#67D4FF;
}

@media (max-width: 767px){
	.fmf-hero-ctas{
		gap:12px;
	}

	.fmf-hero-btn-primary,
	.fmf-hero-btn-secondary{
		padding:15px 22px;
		font-size:15px;
	}
}