/* ========================================
   TLDR Widget
   ======================================== */

   :root {
	--cw-primary: var(--wp--style--color--link, #0D60B5);
}

.cw-tldr {
	background: var(--cw-primary) !important;
	border-radius: 12px;
	padding: 24px 28px;
	margin: 16px 0;
}

.cw-tldr__label {
	margin-bottom: 12px;
}

.cw-tldr__badge {
	display: none; /* hidden — heading acts as the label */
}

.cw-tldr__heading {
	font-size: 20px;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 12px;
	padding: 0;
	line-height: 1.3;
}

.cw-tldr__description {
	font-size: 15px;
	color: #ffffff;
	margin: 0;
	line-height: 1.7;
	opacity: 0.92;
}

/* ========================================
   Callout Widget
   ======================================== */

.cw-callout {
	border-left: 4px solid;
	border-radius: 4px;
	padding: 16px 20px;
	margin: 16px 0;
}

.cw-callout__header {
	margin-bottom: 6px;
}

.cw-callout__icon {
	display: none;
}

.cw-callout__heading {
	font-size: 17px;
	font-weight: 700;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.cw-callout__description {
	font-size: 14px;
	margin: 0;
	line-height: 1.6;
}

/* Information */
.cw-callout--information {
	background: #dbeeff;
	border-color: #1a73e8;
}

.cw-callout--information .cw-callout__heading {
	color: #1a73e8;
}

.cw-callout--information .cw-callout__description {
	color: #1a1a1a;
}

/* Warning */
.cw-callout--warning {
	background: #fde8e8;
	border-color: #d93025;
}

.cw-callout--warning .cw-callout__heading {
	color: #1a1a1a;
}

.cw-callout--warning .cw-callout__description {
	color: #555555;
}

/* ========================================
   CTA Box Widget
   ======================================== */

.cw-cta-box {
	background-color: #1565c0;
	border-radius: 14px;
	padding: 38px 36px 34px;
	text-align: center;
	color: #fff;
	box-sizing: border-box;
}

.cw-cta-box__heading {
	color: #ffffff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 18px;
	padding: 0;
}

.cw-cta-box__body {
	color: rgba(255, 255, 255, 0.92);
	font-size: 15px;
	line-height: 1.65;
	margin: 0 0 26px;
}

.cw-cta-box__btn-wrap {
	display: flex;
	justify-content: center;
}

.cw-cta-box__btn {
	display: inline-block;
	background: #ffffff;
	color: #1565c0;
	font-size: 16px;
	font-weight: 600;
	padding: 13px 38px;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	line-height: 1.4;
}

.cw-cta-box__btn:hover,
.cw-cta-box__btn:focus {
	background: #e8f0fe;
	color: #0d47a1;
	text-decoration: none;
}

/* ========================================
   Table Block
   ======================================== */

.wp-block-table {
	background: var(--cw-primary);
	border-radius: 10px;
	padding: 20px 20px;
	margin: 16px 0;
	overflow: hidden;
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	background: #FFFFFF1A;
	border-radius: 10px;
	overflow: hidden;
}

/* All cells */
.wp-block-table td,
.wp-block-table th {
	color: #ffffff !important;
	padding: 11px 14px;
	font-size: 14px;
	line-height: 1.5;
	border: none !important;
	vertical-align: middle;
	background: transparent;
}

/* Header row (first tbody row or thead) — darker navy overlay */
.wp-block-table tbody tr:first-child td,
.wp-block-table tbody tr:first-child th,
.wp-block-table thead td,
.wp-block-table thead th {
	background: #FFFFFF33;
	font-weight: 500;
	border-bottom: 1px solid #FFFFFF33 !important;
}


/* Subtle separator between body rows */
.wp-block-table tbody tr + tr td,
.wp-block-table tbody tr + tr th {
	border-top: 1px solid #FFFFFF33 !important;
}

/* ========================================
   BMI Calculator Widget
   ======================================== */

/* Container */
.cw-bmi-calc {
	background: #fff;
	border-radius: 18px;
	padding: 24px 22px 20px;
	box-shadow: 0 2px 16px rgba(0,0,0,0.09);
	font-size: 14px;
	box-sizing: border-box;
}

/* Header */
.cw-bmi-calc__title {
	color: #1565c0;
	font-size: 22px;
	font-weight: 700;
	text-align: center;
	margin: 0 0 5px;
	line-height: 1.3;
}
.cw-bmi-title-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: #dbeafe;
	color: #1565c0;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	font-style: normal;
	vertical-align: middle;
	margin-left: 4px;
	cursor: default;
}
.cw-bmi-calc__subtitle {
	text-align: center;
	font-size: 13px;
	color: #666;
	margin: 0 0 18px;
}
.cw-bmi-calc__subtitle a {
	color: #1565c0;
	text-decoration: none;
}
.cw-bmi-calc__subtitle a:hover { text-decoration: underline; }

/* Toggle */
.cw-bmi-toggle {
	display: flex;
	background: #eeeeee;
	border-radius: 50px;
	padding: 4px;
	margin-bottom: 20px;
}
.cw-bmi-toggle-btn {
	flex: 1;
	padding: 9px 10px;
	border: none;
	background: transparent;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 500;
	color: #777;
	cursor: pointer;
	transition: all .2s;
	line-height: 1;
}
.cw-bmi-toggle-btn--active {
	background: #fff;
	color: #111;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0,0,0,0.13);
}

/* Labels */
.cw-bmi-label {
	display: block;
	font-size: 13.5px;
	font-weight: 500;
	color: #333;
	margin-bottom: 7px;
}

/* Field groups */
.cw-bmi-field { margin-bottom: 14px; }

.cw-bmi-row {
	display: flex;
	gap: 10px;
}
.cw-bmi-row .cw-bmi-input { flex: 1; }

/* Inputs */
.cw-bmi-input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid #dde1e9;
	border-radius: 10px;
	font-size: 15px;
	color: #222;
	background: #fff;
	box-sizing: border-box;
	outline: none;
	transition: border-color .18s;
	-moz-appearance: textfield;
	appearance: textfield;
}
.cw-bmi-input::-webkit-outer-spin-button,
.cw-bmi-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cw-bmi-input:focus { border-color: #1565c0; }
.cw-bmi-input::placeholder { color: #bbb; }

/* Calculate button */
.cw-bmi-calc__calc-btn {
	width: 100%;
	padding: 14px;
	background: #1565c0;
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	margin: 6px 0 22px;
	transition: background .18s;
	letter-spacing: .01em;
}
.cw-bmi-calc__calc-btn:hover { background: #1040a0; }

/* Result area */
.cw-bmi-result {
	text-align: center;
}
.cw-bmi-result-title {
	font-size: 15px;
	font-weight: 600;
	color: #222;
	margin: 0 0 2px;
}
.cw-bmi-result-value {
	font-size: 32px;
	font-weight: 700;
	color: #1565c0;
	margin: 0 0 2px;
	min-height: 38px;
	line-height: 1.2;
}
.cw-bmi-result-sub {
	font-size: 13px;
	color: #999;
	margin: 0 0 18px;
}

/* ── BMI Scale bar ── */
.cw-bmi-bar-wrap {
	position: relative;
	margin: 8px 0 0;
}

/* Scale numbers row */
.cw-bmi-scale-nums {
	position: relative;
	height: 18px;
	margin-bottom: 3px;
}
.cw-bmi-scale-nums span {
	position: absolute;
	font-size: 11px;
	color: #666;
	transform: translateX(-50%);
	white-space: nowrap;
}
/* snap first/last to edges */
.cw-bmi-scale-nums span:first-child { transform: translateX(0); }
.cw-bmi-scale-nums span:last-child  { transform: translateX(-100%); }

/* The gradient bar */
.cw-bmi-bar {
	position: relative;
	height: 10px;
	border-radius: 6px;
	background: linear-gradient(to right,
		#3b82f6  0%,
		#22c55e  15%,
		#a3e635  37%,
		#fbbf24  54%,
		#f97316  71%,
		#ef4444  87%,
		#dc2626  100%
	);
}

/* Moving indicator dot */
.cw-bmi-indicator {
	position: absolute;
	top: 50%;
	width: 16px;
	height: 16px;
	background: #fff;
	border: 2.5px solid #222;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	transition: left .4s cubic-bezier(.4,0,.2,1);
	display: none;
}

/* Colour legend below bar */
.cw-bmi-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 14px;
	margin-top: 12px;
}
.cw-bmi-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	color: #444;
	white-space: nowrap;
}
.cw-bmi-legend-item i {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	flex-shrink: 0;
	font-style: normal;
}

/* Disclaimer */
.cw-bmi-disclaimer {
	font-size: 11.5px;
	color: #999;
	line-height: 1.65;
	margin: 18px 0 0;
	text-align: center;
}

/* ── Editor placeholder ── */
.cw-bmi-editor-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 20px;
	background: #f0f6ff;
	border: 2px dashed #93c5fd;
	border-radius: 12px;
	text-align: center;
	color: #1565c0;
}
.cw-bmi-editor-icon { font-size: 28px; }
.cw-bmi-editor-inner p { margin: 0; font-size: 13px; color: #555; }
