/* Module styles for calculator in Noesia Smart Waiter. */
/* =========================================================
   Calculator & BMI — Clinical-style visual match (append only)
   Scope: only Calculator section
   ========================================================= */

section[data-noesia-swa-section-panel="calculator"]{
	--noesia-swa-calc-primary:#2563eb;
	--noesia-swa-calc-primary-soft:rgba(37,99,235,0.08);
	--noesia-swa-calc-primary-border:rgba(37,99,235,0.22);
	--noesia-swa-calc-ciel:#eef7ff;
	--noesia-swa-calc-ciel-2:#f8fcff;
	--noesia-swa-calc-ciel-border:#cfe3ff;
}

/* dark / black safety */
.noesia-swa-admin-wrap.noesia-swa-theme-dark section[data-noesia-swa-section-panel="calculator"],
.noesia-swa-admin-wrap.noesia-swa-theme-black section[data-noesia-swa-section-panel="calculator"],
.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"]{
	--noesia-swa-calc-ciel:#18263a;
	--noesia-swa-calc-ciel-2:#122033;
	--noesia-swa-calc-ciel-border:#294666;
}

/* Top heading like Clinical */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-section-head{
	margin:12px 0 18px;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-section-head h2{
	margin:0 0 10px 0;
	font-size:28px !important;
	font-weight:1000 !important;
	letter-spacing:-0.6px;
	line-height:1.15;
	display:flex;
	align-items:center;
	gap:12px;
	color:var(--noesia-swa-text) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-section-head h2 .dashicons{
	font-size:26px;
	width:26px;
	height:26px;
	line-height:26px;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-section-head > .noesia-swa-muted{
	margin:0;
	font-size:15px !important;
	font-weight:900 !important;
	line-height:1.4;
	color:var(--noesia-swa-text-muted) !important;
}

/* Outer cards */
section[data-noesia-swa-section-panel="calculator"] > .noesia-swa-section-grid{
	align-items:stretch;
}

section[data-noesia-swa-section-panel="calculator"] > .noesia-swa-section-grid > .noesia-swa-card{
	border-radius:22px;
	overflow:hidden;
}

section[data-noesia-swa-section-panel="calculator"] > .noesia-swa-section-grid > .noesia-swa-card > .noesia-swa-card-header{
	margin:-18px -18px 18px;
	padding:16px 20px;
	border-bottom:1px solid var(--noesia-swa-border);
	align-items:center;
}

section[data-noesia-swa-section-panel="calculator"] > .noesia-swa-section-grid > .noesia-swa-card > .noesia-swa-card-header h3{
	margin:0 !important;
	font-size:16px !important;
	font-weight:1000 !important;
	letter-spacing:-0.2px;
	line-height:1.2;
	display:flex;
	align-items:center;
	gap:10px;
	color:var(--noesia-swa-text) !important;
}

section[data-noesia-swa-section-panel="calculator"] > .noesia-swa-section-grid > .noesia-swa-card > .noesia-swa-card-header h3 .dashicons{
	font-size:20px;
	width:20px;
	height:20px;
	line-height:20px;
}

section[data-noesia-swa-section-panel="calculator"] > .noesia-swa-section-grid > .noesia-swa-card > .noesia-swa-card-header .noesia-swa-muted{
	display:none; /* hides old extra subtext if present */
}

/* Ciel result / preview boxes */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box,
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats > div{
	padding:16px;
	border-radius:16px;
	border:1px solid var(--noesia-swa-calc-ciel-border);
	background:linear-gradient(180deg, var(--noesia-swa-calc-ciel) 0%, var(--noesia-swa-calc-ciel-2) 100%);
	box-shadow:inset 0 1px 0 rgba(255,255,255,0.72);
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box strong,
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats strong{
	display:block;
	margin-bottom:6px;
	font-size:14px !important;
	font-weight:900 !important;
	line-height:1.35;
	letter-spacing:0;
	text-transform:none;
	color:var(--noesia-swa-text-muted) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box span{
	display:block;
	font-size:15px !important;
	font-weight:800 !important;
	line-height:1.45;
	color:var(--noesia-swa-text) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats > div:first-child span{
	display:block;
	font-size:28px !important;
	font-weight:1000 !important;
	line-height:1.1;
	letter-spacing:-0.5px;
	color:var(--noesia-swa-text) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats > div:not(:first-child) span{
	display:block;
	font-size:15px !important;
	font-weight:800 !important;
	line-height:1.45;
	color:var(--noesia-swa-text) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats .noesia-swa-muted{
	margin-top:4px;
	font-size:14px !important;
	font-weight:900 !important;
	line-height:1.45;
	color:var(--noesia-swa-text-muted) !important;
}

/* Calculator display (supports both versions: server-driven + old client-side) */
section[data-noesia-swa-section-panel="calculator"] #noesia-swa-calculator-display,
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-display,
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box input[type="text"]{
	width:100%;
	min-height:auto;
	padding:0;
	margin:0;
	border:0 !important;
	background:transparent !important;
	box-shadow:none !important;
	outline:none !important;
	text-align:right;
	font-size:28px !important;
	font-weight:1000 !important;
	line-height:1.1;
	letter-spacing:-0.6px;
	color:var(--noesia-swa-text) !important;
}

/* Form fields like Clinical */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group label{
	display:block;
	margin-bottom:6px;
	font-size:14px !important;
	font-weight:900 !important;
	line-height:1.35;
	color:var(--noesia-swa-text-muted) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="text"],
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="number"],
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group select{
	min-height:44px;
	padding:10px 12px;
	border-radius:14px;
	border:1px solid #cbd5e1;
	background:#fff;
	font-size:14px !important;
	font-weight:800 !important;
	color:#334155 !important;
	box-sizing:border-box;
}

.noesia-swa-admin-wrap.noesia-swa-theme-dark section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="text"],
.noesia-swa-admin-wrap.noesia-swa-theme-dark section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="number"],
.noesia-swa-admin-wrap.noesia-swa-theme-dark section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group select,
.noesia-swa-admin-wrap.noesia-swa-theme-black section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="text"],
.noesia-swa-admin-wrap.noesia-swa-theme-black section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="number"],
.noesia-swa-admin-wrap.noesia-swa-theme-black section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group select,
.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="text"],
.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="number"],
.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group select{
	border-color:var(--noesia-swa-border);
	background:var(--noesia-swa-surface);
	color:var(--noesia-swa-text) !important;
}

/* BMI action buttons like Clinical */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-inline-actions{
	margin-top:14px;
	gap:10px;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-inline-actions .button{
	min-height:44px;
	padding:0 16px !important;
	border-radius:16px !important;
	display:inline-flex !important;
	align-items:center;
	justify-content:center;
	gap:10px;
	font-size:14px !important;
	font-weight:1000 !important;
	line-height:1 !important;
	text-decoration:none;
	box-shadow:none !important;
	transition:transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-inline-actions .button.button-primary{
	background:var(--noesia-swa-calc-primary) !important;
	border-color:var(--noesia-swa-calc-primary) !important;
	color:#fff !important;
	box-shadow:0 18px 32px rgba(37,99,235,0.20) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-inline-actions .button:not(.button-primary){
	background:var(--noesia-swa-surface) !important;
	border:1px solid var(--noesia-swa-border) !important;
	color:var(--noesia-swa-text) !important;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-inline-actions .button:hover{
	transform:translateY(-1px);
}

/* Calculator keypad: supports BOTH table version and old div-grid version */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad{
	display:grid;
	grid-template-columns:repeat(4, minmax(0, 1fr));
	gap:12px;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn,
section[data-noesia-swa-section-panel="calculator"] table.widefat button[name="noesia_swa_calc_key"]{
	width:100%;
	min-height:70px;
	padding:0 12px !important;
	border-radius:16px !important;
	border:1px solid var(--noesia-swa-border) !important;
	background:var(--noesia-swa-surface) !important;
	color:var(--noesia-swa-text) !important;
	font-size:14px !important;
	font-weight:1000 !important;
	line-height:1 !important;
	display:inline-flex !important;
	align-items:center;
	justify-content:center;
	box-shadow:none !important;
	transition:transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}

section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn:hover,
section[data-noesia-swa-section-panel="calculator"] table.widefat button[name="noesia_swa_calc_key"]:hover{
	transform:translateY(-1px);
	background:var(--noesia-swa-calc-primary-soft) !important;
	border-color:var(--noesia-swa-calc-primary-border) !important;
}

/* table cleanup */
section[data-noesia-swa-section-panel="calculator"] table.widefat{
	width:100%;
	margin:0 0 14px;
	border:0 !important;
	box-shadow:none !important;
	background:transparent !important;
	border-collapse:separate;
	border-spacing:12px;
}

section[data-noesia-swa-section-panel="calculator"] table.widefat tbody,
section[data-noesia-swa-section-panel="calculator"] table.widefat tr,
section[data-noesia-swa-section-panel="calculator"] table.widefat td{
	border:0 !important;
	background:transparent !important;
	box-shadow:none !important;
}

section[data-noesia-swa-section-panel="calculator"] table.widefat td{
	padding:0 !important;
}

/* right-side operators (visual blue like the Clinical feel you described) */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn[data-noesia-swa-calc="/"],
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn[data-noesia-swa-calc="*"],
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn[data-noesia-swa-calc="-"],
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn[data-noesia-swa-calc="+"],
section[data-noesia-swa-section-panel="calculator"] table.widefat button[name="noesia_swa_calc_key"][value="/"],
section[data-noesia-swa-section-panel="calculator"] table.widefat button[name="noesia_swa_calc_key"][value="*"],
section[data-noesia-swa-section-panel="calculator"] table.widefat button[name="noesia_swa_calc_key"][value="-"],
section[data-noesia-swa-section-panel="calculator"] table.widefat button[name="noesia_swa_calc_key"][value="+"]{
	background:var(--noesia-swa-calc-primary-soft) !important;
	border-color:var(--noesia-swa-calc-primary-border) !important;
	color:var(--noesia-swa-calc-primary) !important;
}

/* equals = strong blue */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn[data-noesia-swa-calc="="],
section[data-noesia-swa-section-panel="calculator"] table.widefat button[name="noesia_swa_calc_key"][value="="]{
	background:var(--noesia-swa-calc-primary) !important;
	border-color:var(--noesia-swa-calc-primary) !important;
	color:#fff !important;
	box-shadow:0 18px 32px rgba(37,99,235,0.20) !important;
}

/* keep old wide zero button reasonable if old file is still used */
section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad .noesia-swa-calc-btn--wide{
	grid-column:span 2;
}

/* responsive */
@media (max-width: 1100px){
	section[data-noesia-swa-section-panel="calculator"] > .noesia-swa-section-grid{
		grid-template-columns:1fr;
	}
}

@media (max-width: 700px){
	section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-pad{
		grid-template-columns:repeat(2, minmax(0, 1fr));
	}

	section[data-noesia-swa-section-panel="calculator"] table.widefat{
		border-spacing:8px;
	}
}
/* =========================================================
.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"]{background:transparent !important;
	color:#111827 !important;}.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats > div{background:linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
	border:1px solid #dbe3ef !important;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.85),
		0 10px 24px rgba(15, 23, 42, 0.04) !important;
	color:#111827 !important;}.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box strong, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats strong, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group label{color:#475569 !important;}.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box span, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats span, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats .noesia-swa-muted, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] h2, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] h3, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-card-header h3{color:#111827 !important;}.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] #noesia-swa-calculator-display, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-calculator-display, .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box input[type="text"]{color:#111827 !important;
	-webkit-text-fill-color:#111827 !important;
	opacity:1 !important;}.noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="text"], .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group input[type="number"], .noesia-swa-admin-wrap.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-form-group select{background:#ffffff !important;
	border-color:#d8e4f3 !important;
	color:#111827 !important;}
/* Minimal Theme Fixes for Calculator */
.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box,
.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats > div {
    background: #ffffff !important;
    border-color: #dbe3ef !important;
}
.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box strong,
.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-status-box span,
.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats strong,
.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] .noesia-swa-mini-stats span,
.noesia-swa-theme-minimal section[data-noesia-swa-section-panel="calculator"] label {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}
