/* Liaqa Coach Macro Calculator — calculator.css */

.liaqa-cmc-wrapper *, .liaqa-cmc-wrapper *::before, .liaqa-cmc-wrapper *::after { box-sizing: border-box; margin: 0; padding: 0; }

.liaqa-cmc-wrapper {
	font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #1a1b2e;
	--lcmc-teal:   #00b5b1;
	--lcmc-teal-l: #e0f7f6;
	--lcmc-teal-d: #007a77;
	--lcmc-pink:   #ff004e;
	--lcmc-yellow: #ffaf08;
	--lcmc-navy:   #272660;
	--lcmc-navy-l: #eeeef8;
	--lcmc-bg:     #f5f7ff;
	--lcmc-sv:     #f0f1fa;
	--lcmc-out:    #d0d2e4;
	--lcmc-muted:  #63647a;
}

.lcmc-hidden { display: none !important; }

/* ── Coach section ──────────────────────────────────────────────────────────── */
.lcmc-coach-card { background: var(--lcmc-sv) !important; }
.lcmc-coach-row  { display: flex; flex-wrap: wrap; gap: 14px; }


.lcmc-stack { display: flex; flex-direction: column; gap: 0; }

/* ── Card ───────────────────────────────────────────────────────────────────── */
.lcmc-card { background: #fff; padding: 20px 16px; border-bottom: 1px solid var(--lcmc-sv); }
.lcmc-dark { background: var(--lcmc-navy); border-bottom: none; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
.lcmc-sl  { display: block; font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.lcmc-lbl { display: block; font-weight: 500; font-size: 13px; color: var(--lcmc-muted); margin-bottom: 6px; }

/* ── Inputs ─────────────────────────────────────────────────────────────────── */
.liaqa-cmc-wrapper input[type=text],
.liaqa-cmc-wrapper input[type=number],
.liaqa-cmc-wrapper input[type=date],
.liaqa-cmc-wrapper textarea {
	width: 100%; padding: 11px 14px; border-radius: 12px;
	border: 1.5px solid var(--lcmc-out);
	font-family: inherit; font-size: 16px; color: #1a1b2e;
	background: #fff; outline: none; transition: border-color .2s;
}
.liaqa-cmc-wrapper input:focus,
.liaqa-cmc-wrapper textarea:focus { border-color: var(--lcmc-teal); }
.liaqa-cmc-wrapper textarea { resize: vertical; line-height: 1.6; }
.liaqa-cmc-wrapper button { cursor: pointer; font-family: inherit; transition: all .2s; }

/* ── Pill button ────────────────────────────────────────────────────────────── */
.lcmc-pill { padding: 10px 20px; border-radius: 100px; border: 1.5px solid var(--lcmc-out); background: transparent; color: var(--lcmc-muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.lcmc-pill.lcmc-on { background: var(--lcmc-navy); border-color: var(--lcmc-navy); color: #fff; }

/* ── Mode toggle ────────────────────────────────────────────────────────────── */
.lcmc-mode-section { padding: 16px 16px 0; background: var(--lcmc-bg); }
.lcmc-mode-cards   { display: flex; gap: 10px; margin-bottom: 0; }
.lcmc-mode-card    { flex: 1; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--lcmc-out); background: transparent; cursor: pointer; text-align: left; }
.lcmc-mode-card.lcmc-on { border-color: var(--lcmc-navy); background: var(--lcmc-navy-l); }
.lcmc-mode-title   { display: block; font-weight: 700; font-size: 15px; color: #1a1b2e; margin-bottom: 4px; }
.lcmc-mode-card.lcmc-on .lcmc-mode-title { color: var(--lcmc-navy); }
.lcmc-mode-desc    { display: block; font-size: 12px; color: var(--lcmc-muted); line-height: 1.5; }

/* ── Unit toggle ────────────────────────────────────────────────────────────── */
.lcmc-unit-seg  { display: flex; background: var(--lcmc-sv); border-radius: 100px; padding: 3px; }
.lcmc-unit-opt  { padding: 7px 14px; border-radius: 100px; border: none; background: transparent; color: var(--lcmc-muted); font-weight: 600; font-size: 13px; }
.lcmc-unit-opt.lcmc-on { background: var(--lcmc-navy); color: #fff; }

/* ── Calc top ───────────────────────────────────────────────────────────────── */
.lcmc-calc-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

/* ── Num fields ─────────────────────────────────────────────────────────────── */
.lcmc-num-fields { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 24px; }
.lcmc-num-fields > div { flex: 0 0 auto; }

/* ── Client fields ──────────────────────────────────────────────────────────── */
.lcmc-client-fields { display: flex; flex-direction: column; gap: 14px; }

/* ── Activity ───────────────────────────────────────────────────────────────── */
.lcmc-act-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.lcmc-act-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--lcmc-out); background: transparent; cursor: pointer; text-align: left; width: 100%; }
.lcmc-act-item.lcmc-on { border-color: var(--lcmc-teal); background: var(--lcmc-teal-l); }
.lcmc-act-left { display: flex; flex-direction: column; gap: 2px; }
.lcmc-act-name { font-weight: 700; font-size: 15px; color: #1a1b2e; }
.lcmc-act-item.lcmc-on .lcmc-act-name { color: var(--lcmc-teal-d); }
.lcmc-act-desc { font-size: 14px; color: var(--lcmc-muted); }
.lcmc-act-mult { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 13px; color: var(--lcmc-muted); background: var(--lcmc-sv); padding: 4px 12px; border-radius: 100px; flex-shrink: 0; }
.lcmc-act-item.lcmc-on .lcmc-act-mult { color: var(--lcmc-teal); background: rgba(0,181,177,.12); }
.lcmc-act-desc-line { margin-top: 10px; font-size: 14px; color: var(--lcmc-muted); }

/* ── Diet ───────────────────────────────────────────────────────────────────── */
.lcmc-diet-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.lcmc-diet-card { padding: 12px 10px; border-radius: 12px; border: 2px solid var(--lcmc-out); background: transparent; cursor: pointer; transition: all .18s; text-align: left; }
.lcmc-diet-emoji { font-size: 20px; display: block; margin-bottom: 6px; }
.lcmc-diet-name  { font-weight: 700; font-size: 14px; color: #1a1b2e; margin-bottom: 3px; }
.lcmc-diet-tag   { font-size: 12px; color: var(--lcmc-muted); display: block; margin-bottom: 10px; line-height: 1.35; }
.lcmc-diet-pips  { display: flex; gap: 4px; }
.lcmc-pip   { flex: 1; background: var(--lcmc-sv); border-radius: 6px; padding: 3px 0; text-align: center; }
.lcmc-pip-l { font-size: 8px; font-weight: 700; display: block; }
.lcmc-pip-v { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 11px; color: #1a1b2e; display: block; }

/* ── Advanced ───────────────────────────────────────────────────────────────── */
.lcmc-adv-title   { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lcmc-muted); margin-bottom: 16px; }
.lcmc-macro-row   { margin-bottom: 20px; }
.lcmc-macro-hd    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lcmc-macro-left  { display: flex; align-items: center; gap: 8px; }
.lcmc-dot         { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lcmc-macro-lbl   { font-weight: 600; font-size: 15px; }
.lcmc-macro-right { display: flex; align-items: baseline; gap: 8px; }
.lcmc-macro-pct   { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 20px; }
.lcmc-macro-info  { font-size: 13px; color: var(--lcmc-muted); }
.lcmc-auto-badge  { font-size: 9px; background: #fff8e1; color: #a37500; padding: 2px 7px; border-radius: 100px; font-weight: 700; text-transform: uppercase; }
.lcmc-auto-bar    { height: 8px; background: var(--lcmc-sv); border-radius: 100px; overflow: hidden; }
.lcmc-auto-fill   { height: 100%; border-radius: 100px; background: var(--lcmc-yellow); transition: width .3s; }
.lcmc-divider     { border-top: 1px solid var(--lcmc-out); margin: 24px 0; }
.lcmc-range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--lcmc-muted); margin-top: 4px; }
.lcmc-adj-box     { display: none; margin-top: 16px; padding: 13px 16px; background: var(--lcmc-navy-l); border-radius: 12px; justify-content: space-between; align-items: center; }
.lcmc-adj-box-show { display: flex !important; }
.lcmc-adj-box span:first-child { font-size: 14px; color: var(--lcmc-muted); font-weight: 500; }
.lcmc-adj-box strong { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 18px; color: var(--lcmc-navy); }

/* ── Range inputs ───────────────────────────────────────────────────────────── */
.lcmc-range { -webkit-appearance: none; appearance: none; height: 8px; border-radius: 100px; outline: none; cursor: pointer; display: block; width: 100%; border: none; padding: 0; }
.lcmc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); cursor: pointer; }
.rp::-webkit-slider-thumb { background: var(--lcmc-teal); }
.rf::-webkit-slider-thumb { background: var(--lcmc-pink); }
.rc::-webkit-slider-thumb { background: var(--lcmc-navy); }

/* ── Tips ───────────────────────────────────────────────────────────────────── */
.lcmc-tips-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.lcmc-tips-icon-wrap { display: flex; align-items: center; gap: 12px; }
.lcmc-tips-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.lcmc-tips-copy { padding: 9px 18px; border-radius: 100px; border: 1.5px solid currentColor; background: transparent; font-weight: 700; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.lcmc-tips-row  { display: flex; flex-direction: column; gap: 12px; }
.lcmc-tip-card  { padding: 16px; border-radius: 12px; }
.lcmc-tip-head  { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lcmc-tip-icon  { font-size: 20px; }
.lcmc-tip-cat   { font-weight: 700; font-size: 14px; }
.lcmc-tip-text  { font-size: 14px; line-height: 1.75; }
.lcmc-pdf-toggle { width: 42px; height: 24px; border-radius: 100px; background: var(--lcmc-out); cursor: pointer; position: relative; transition: background .22s; flex-shrink: 0; }
.lcmc-pdf-thumb  { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .22s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }

/* ── Results ────────────────────────────────────────────────────────────────── */
.lcmc-stat-row   { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 24px; }
.lcmc-stat-tile  { background: rgba(255,255,255,.07); border-radius: 12px; padding: 16px; }
.lcmc-stat-lbl   { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.lcmc-stat-val   { display: block; font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin-bottom: 4px; }
.lcmc-stat-sub   { display: block; font-size: 12px; color: rgba(255,255,255,.3); }
.lcmc-results-body { display: flex; flex-direction: column; gap: 24px; }
.lcmc-donut-wrap   { text-align: center; }
.lcmc-donut-legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.lcmc-legend-item  { display: flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255,255,255,.45); font-weight: 600; }
.lcmc-legend-dot   { width: 8px; height: 8px; border-radius: 50%; }
.lcmc-bars-title   { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 16px; }
.lcmc-bar-row  { margin-bottom: 16px; }
.lcmc-bar-hd   { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; flex-wrap: wrap; gap: 6px; }
.lcmc-bar-left { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: rgba(255,255,255,.7); }
.lcmc-bar-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lcmc-bar-vals { display: flex; gap: 12px; align-items: baseline; }
.lcmc-bar-g    { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 18px; }
.lcmc-bar-sub  { font-size: 13px; color: rgba(255,255,255,.35); }
.lcmc-bar-track { height: 5px; background: rgba(255,255,255,.08); border-radius: 100px; overflow: hidden; }
.lcmc-bar-fill  { height: 100%; border-radius: 100px; transition: width .5s; }
.lcmc-per-meal  { margin-top: 16px; padding: 12px 16px; background: rgba(255,255,255,.07); border-radius: 10px; font-size: 14px; color: rgba(255,255,255,.5); }
.lcmc-formula-note { margin-top: 12px; font-size: 11px; color: rgba(255,255,255,.2); font-style: italic; }
.lcmc-r-empty  { padding: 48px 0; text-align: center; color: rgba(255,255,255,.2); }
.lcmc-r-empty-icon { font-size: 32px; margin-bottom: 10px; }
.lcmc-r-empty p { font-size: 14px; font-weight: 500; line-height: 1.7; }

/* ── Export ─────────────────────────────────────────────────────────────────── */
.lcmc-export-section { padding: 16px; }
.lcmc-exp-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lcmc-exp-btn { padding: 12px 22px; border-radius: 100px; font-weight: 700; font-size: 14px; }
.lcmc-exp-json { border: 1.5px solid var(--lcmc-navy); background: transparent; color: var(--lcmc-navy); }
.lcmc-exp-txt  { border: 1.5px solid var(--lcmc-out);  background: transparent; color: var(--lcmc-muted); }
.lcmc-exp-pdf  { border: none; background: var(--lcmc-navy); color: #fff; }
.lcmc-exp-done { border-color: #16a34a !important; background: #f0fdf4 !important; color: #16a34a !important; }

/* ═══════════════════════════════════════════════════════════════════════════════
   TABLET  768px+
═══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
	.lcmc-stack        { gap: 16px; }
	.lcmc-mode-section { padding: 0; background: transparent; }
	.lcmc-card         { border-radius: 16px; padding: 22px; border-bottom: none; box-shadow: 0 1px 3px rgba(39,38,96,.05), 0 4px 16px rgba(39,38,96,.04); }
	.lcmc-dark         { box-shadow: 0 8px 28px rgba(39,38,96,.24); }
	.lcmc-client-fields { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
	.lcmc-field-name   { flex: 0 0 260px; }
	.lcmc-field-date   { flex: 0 0 180px; }
	.lcmc-field-meals  { flex: 0 0 auto; }
	.lcmc-field-notes  { flex: 1 1 100%; }
	.lcmc-act-list     { flex-direction: row; flex-wrap: wrap; gap: 8px; }
	.lcmc-act-item     { flex: 1 1 28%; width: auto; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; }
	.lcmc-act-desc     { display: none; }
	.lcmc-act-desc-line { display: block; }
	.lcmc-diet-grid    { grid-template-columns: repeat(4,1fr); gap: 10px; }
	.lcmc-diet-card    { padding: 14px 12px; }
	.lcmc-tips-row     { flex-direction: row; flex-wrap: wrap; gap: 12px; }
	.lcmc-tip-card     { flex: 1 1 45%; }
	.lcmc-stat-row     { grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 28px; }
	.lcmc-export-section { padding: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DESKTOP  1024px+
═══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
	.lcmc-card         { border-radius: 20px; padding: 28px; }
	/* Client grid: Name + Date on row 1, Meals on row 2 (collapses when hidden), Notes spans both rows */
	.lcmc-client-fields {
		display: grid;
		grid-template-columns: 260px 180px 1fr;
		grid-template-rows: auto auto;
		column-gap: 20px;
		row-gap: 16px;
		align-items: end;
	}
	.lcmc-field-name  { grid-column: 1; grid-row: 1; }
	.lcmc-field-date  { grid-column: 2; grid-row: 1; }
	.lcmc-field-meals { grid-column: 1 / 3; grid-row: 2; align-self: start; }
	.lcmc-field-notes { grid-column: 3; grid-row: 1 / 3; align-self: stretch; }
	.lcmc-field-notes textarea { height: 100%; min-height: 80px; }
	div#lcmc-mealBtns { text-align: center; }
	.lcmc-num-fields   { flex-wrap: nowrap; gap: 20px; margin-bottom: 28px; }
	/* Gender field: full-width on mobile, auto on desktop */
	.lcmc-num-fields > div[style*="flex:0 0 100%"],
	.lcmc-num-fields > div[style*="flex: 0 0 100%"] { flex: 0 0 auto !important; width: auto !important; }
	.lcmc-act-list     { flex-wrap: nowrap; background: var(--lcmc-sv); border-radius: 14px; padding: 4px; gap: 0; }
	.lcmc-act-item     { flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 8px; border-radius: 10px; border: none; background: transparent; }
	.lcmc-act-item.lcmc-on { background: #fff; border: none; box-shadow: 0 1px 4px rgba(39,38,96,.1); }
	.lcmc-act-name     { font-size: 13px; }
	.lcmc-act-mult     { padding: 3px 8px; font-size: 11px; margin-top: 4px; }
	.lcmc-act-desc-line { display: block; }
	.lcmc-diet-grid    { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
	.lcmc-diet-card    { flex: unset; min-width: 0; padding: 16px 12px; }
	.lcmc-tips-row     { flex-wrap: nowrap; gap: 16px; }
	.lcmc-tip-card     { flex: 1; padding: 20px; }
	.lcmc-stat-row     { display: flex; gap: 14px; margin-bottom: 32px; }
	.lcmc-stat-tile    { flex: 1; padding: 20px 22px; border-radius: 16px; }
	.lcmc-stat-val     { font-size: 28px; }
	.lcmc-results-body { flex-direction: row; gap: 48px; align-items: center; }
	.lcmc-bar-g        { font-size: 20px; }
	.lcmc-bar-row      { margin-bottom: 18px; }
	.lcmc-bar-track    { height: 6px; }
	/* Activity: show description inside each card, hide the line below */
	.lcmc-act-desc     { display: block; font-size: 11px; color: var(--lcmc-muted); margin-top: 4px; }
	.lcmc-act-item.lcmc-on .lcmc-act-desc { color: var(--lcmc-teal-d); }
	.lcmc-act-desc-line { display: none; }
}
