/* LIC Premium Calculator Pro — frontend styles
   Theme: navy + gold, in keeping with a premium LIC advisor brand
   (deep navy header, gold accents for awards/highlights, clean card body). */

.lic-calculator-wrapper {
	--lic-navy: #0b2545;
	--lic-navy-dark: #061529;
	--lic-navy-light: #12345f;
	--lic-teal: #0f8b8d;
	--lic-teal-dark: #0c6f70;
	--lic-gold: #d4a017;
	--lic-gold-light: #f0c75e;
	--lic-border: #e2e8f0;
	--lic-bg-soft: #f7f9fc;
	--lic-text: #1a2b3c;
	--lic-text-muted: #64748b;
	--lic-danger: #d63638;
	--lic-danger-bg: #fdf1f1;

	max-width: 1040px;
	margin: 32px auto;
	padding: 0;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 20px 48px -18px rgba(11, 37, 69, 0.28);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--lic-text);
	box-sizing: border-box;
	border: 1px solid rgba(11, 37, 69, 0.06);
}
.lic-calculator-wrapper *,
.lic-calculator-wrapper *::before,
.lic-calculator-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */
.lic-calc-header {
	background: linear-gradient(135deg, var(--lic-navy-light) 0%, var(--lic-navy) 55%, var(--lic-navy-dark) 100%);
	padding: 34px 40px 28px;
	position: relative;
	overflow: hidden;
}
.lic-calc-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--lic-gold) 0%, var(--lic-gold-light) 50%, var(--lic-gold) 100%);
}
.lic-calc-header::before {
	content: "";
	position: absolute;
	top: -60%;
	right: -8%;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(212, 160, 23, 0.16) 0%, rgba(212, 160, 23, 0) 70%);
	pointer-events: none;
}
.lic-calc-title {
	margin: 0 0 8px 0;
	font-size: 25px;
	line-height: 1.3;
	font-weight: 800;
	color: #fff;
	padding-right: 110px;
	letter-spacing: -0.01em;
	position: relative;
}
.lic-calc-badge {
	position: absolute;
	top: 34px;
	right: 40px;
	background: rgba(212, 160, 23, 0.16);
	color: var(--lic-gold-light);
	border: 1px solid rgba(212, 160, 23, 0.45);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 6px 12px;
	border-radius: 999px;
	white-space: nowrap;
}
.lic-calc-subtitle {
	margin: 0;
	font-size: 14.5px;
	color: rgba(255, 255, 255, 0.75);
	position: relative;
	max-width: 560px;
}

/* ---------- Form ---------- */
.lic-calculator-form {
	padding: 34px 40px 10px;
}
.lic-calc-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 22px;
	margin-bottom: 8px;
}
.lic-calc-field {
	display: flex;
	flex-direction: column;
	position: relative;
}
.lic-calc-field label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--lic-navy);
	margin-bottom: 9px;
	letter-spacing: 0.01em;
}
.lic-calc-field-icon {
	font-size: 14px;
	line-height: 1;
	opacity: 0.85;
}
.lic-calc-field label .required {
	color: var(--lic-danger);
	font-weight: 700;
}
.lic-calc-input {
	width: 100%;
	padding: 13px 15px;
	font-size: 15px;
	font-family: inherit;
	font-weight: 600;
	color: var(--lic-text);
	background: var(--lic-bg-soft);
	border: 1.5px solid var(--lic-border);
	border-radius: 9px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}
select.lic-calc-input {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%2364748b'/></svg>");
	background-repeat: no-repeat;
	background-position: right 15px center;
	padding-right: 36px;
}
.lic-calc-input:hover {
	border-color: #cbd5e1;
}
.lic-calc-input:focus {
	outline: none;
	border-color: var(--lic-gold);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(212, 160, 23, 0.16);
}
.lic-calc-input::placeholder {
	color: #9aa7b8;
	font-weight: 400;
}
.lic-calc-hint {
	margin-top: 7px;
	font-size: 12px;
	color: var(--lic-text-muted);
	font-weight: 500;
}

/* ---------- Checkbox field (single, legacy) ---------- */
.lic-calc-field-checkbox {
	justify-content: center;
}
.lic-calc-checkbox-label {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin-bottom: 0 !important;
	padding: 13px 15px;
	background: var(--lic-bg-soft);
	border: 1.5px solid var(--lic-border);
	border-radius: 9px;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--lic-text);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.lic-calc-checkbox-label:hover {
	border-color: #cbd5e1;
}
.lic-calc-checkbox {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: var(--lic-gold);
	cursor: pointer;
}
.lic-calc-checkbox-icon {
	font-size: 15px;
	line-height: 1;
	flex-shrink: 0;
}

/* ---------- Optional Riders (checkbox group) ---------- */
.lic-calc-field-riders {
	grid-column: 1 / -1;
	margin-top: 4px;
}
.lic-calc-riders-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--lic-navy);
	margin-bottom: 12px;
}
.lic-calc-riders-optional {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--lic-text-muted);
	background: var(--lic-bg-soft);
	border: 1px solid var(--lic-border);
	padding: 2px 8px;
	border-radius: 999px;
}
.lic-calc-riders-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 12px;
}
.lic-calc-rider-chip {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 40px 13px 14px;
	background: var(--lic-bg-soft);
	border: 1.5px solid var(--lic-border);
	border-radius: 10px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: var(--lic-text);
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.lic-calc-rider-chip:hover {
	border-color: var(--lic-gold);
	transform: translateY(-1px);
}
.lic-calc-rider-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.lic-calc-rider-icon {
	font-size: 16px;
	line-height: 1;
	flex-shrink: 0;
}
.lic-calc-rider-text {
	line-height: 1.35;
}
.lic-calc-rider-check {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%) scale(0.4);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--lic-gold);
	color: #fff;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}
.lic-calc-rider-chip:has(.lic-calc-rider-checkbox:checked) {
	background: rgba(212, 160, 23, 0.1);
	border-color: var(--lic-gold);
	box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.12);
}
.lic-calc-rider-chip:has(.lic-calc-rider-checkbox:checked) .lic-calc-rider-check {
	opacity: 1;
	transform: translateY(-50%) scale(1);
}
.lic-calc-rider-chip:has(.lic-calc-rider-checkbox:focus-visible) {
	outline: 2px solid var(--lic-gold);
	outline-offset: 2px;
}

/* ---------- Button ---------- */
.lic-calc-actions {
	text-align: center;
	margin: 26px 0 22px;
}
.lic-calc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, var(--lic-navy-light) 0%, var(--lic-navy) 100%);
	color: #fff;
	border: none;
	border-bottom: 3px solid var(--lic-gold);
	padding: 15px 48px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.01em;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 10px 24px -10px rgba(11, 37, 69, 0.55);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.lic-calc-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 28px -10px rgba(11, 37, 69, 0.65);
}
.lic-calc-button:active {
	transform: translateY(0);
}
.lic-calc-button:disabled {
	background: #cbd5e1;
	border-bottom-color: transparent;
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
	opacity: 0.8;
}

/* ---------- Message / error ---------- */
.lic-calc-message {
	margin: 4px 0 20px;
	padding: 13px 16px;
	border-radius: 8px;
	font-size: 13.5px;
	line-height: 1.5;
}
.lic-calc-message.lic-calc-error {
	background: var(--lic-danger-bg);
	border-left: 3px solid var(--lic-danger);
	color: var(--lic-danger);
}

/* ---------- Loader ---------- */
.lic-calc-loader {
	text-align: center;
	padding: 40px 20px 48px;
}
.lic-calc-spinner {
	width: 42px;
	height: 42px;
	margin: 0 auto 16px;
	border: 3px solid var(--lic-border);
	border-top: 3px solid var(--lic-gold);
	border-radius: 50%;
	animation: lic-spin 0.8s linear infinite;
}
.lic-calc-loader p {
	margin: 0;
	font-size: 14px;
	color: var(--lic-text-muted);
}
@keyframes lic-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ---------- Results ---------- */
.lic-calc-results {
	margin: 0 40px 34px;
	padding: 26px 28px 22px;
	background: var(--lic-bg-soft);
	border: 1px solid var(--lic-border);
	border-radius: 14px;
	animation: lic-fade-in 0.35s ease;
}
@keyframes lic-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
.lic-calc-results-title {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 20px 0;
	font-size: 17px;
	font-weight: 800;
	color: var(--lic-navy);
}
.lic-calc-results-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--lic-gold);
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	flex-shrink: 0;
}
.lic-calc-tables {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
	gap: 18px;
	align-items: start;
}

/* ---------- Result tables ---------- */
.lic-calc-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid var(--lic-border);
	border-radius: 12px;
	overflow: hidden;
	font-size: 13.5px;
	box-shadow: 0 2px 8px -4px rgba(11, 37, 69, 0.1);
}
.lic-calc-table thead tr:first-child th {
	background: linear-gradient(135deg, var(--lic-navy-light) 0%, var(--lic-navy) 100%);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-align: left;
	padding: 11px 16px;
	letter-spacing: 0.01em;
}
.lic-calc-table-note {
	font-weight: 500;
	opacity: 0.75;
	font-size: 11.5px;
	margin-left: 4px;
}
.lic-calc-table thead tr:nth-child(2) th {
	background: var(--lic-bg-soft);
	color: var(--lic-text-muted);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 9px 16px;
	border-bottom: 1px solid var(--lic-border);
}
.lic-calc-table tbody td {
	padding: 11px 16px;
	border-top: 1px solid var(--lic-border);
	color: var(--lic-text);
	vertical-align: top;
}
.lic-calc-table tbody tr:hover td {
	background: var(--lic-bg-soft);
}
.lic-calc-num {
	text-align: right;
	white-space: nowrap;
}
.lic-calc-muted {
	color: var(--lic-text-muted);
	font-weight: 400;
}
.lic-calc-subtext {
	font-size: 11.5px;
	color: var(--lic-text-muted);
	font-weight: 400;
	margin-top: 2px;
}
.lic-calc-row-highlight td {
	background: rgba(212, 160, 23, 0.1);
	border-top: 1.5px solid var(--lic-gold);
	color: var(--lic-navy);
}
.lic-calc-row-highlight:hover td {
	background: rgba(212, 160, 23, 0.16);
}
.lic-calc-row-warning td {
	background: rgba(212, 160, 23, 0.1);
	border-top: 1px solid rgba(212, 160, 23, 0.35);
}
.lic-calc-tag {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.lic-calc-tag-yes {
	background: rgba(212, 160, 23, 0.16);
	color: #9a7412;
}
.lic-calc-tag-no {
	background: #eef1f5;
	color: var(--lic-text-muted);
}
.lic-calc-rider-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-end;
}
.lic-calc-disclaimer {
	margin: 20px 0 0;
	font-size: 11.5px;
	line-height: 1.6;
	color: var(--lic-text-muted);
}

/* Selected Parameters + Premium Details tables should each take a full
   row on their own since they read top-to-bottom; Maturity/Death can sit
   side-by-side on wide screens thanks to the auto-fit grid above. */
.lic-calc-table-full {
	grid-column: 1 / -1;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.lic-calculator-wrapper { max-width: 100%; }
	.lic-calc-tables { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.lic-calculator-wrapper { margin: 16px 8px; border-radius: 14px; }
	.lic-calc-header { padding: 24px 20px 20px; }
	.lic-calc-title { font-size: 20px; padding-right: 0; }
	.lic-calc-badge { position: static; display: inline-block; margin: 8px 0 4px; }
	.lic-calculator-form { padding: 24px 20px 6px; }
	.lic-calc-fields { grid-template-columns: 1fr; }
	.lic-calc-riders-grid { grid-template-columns: 1fr; }
	.lic-calc-results { margin: 0 16px 24px; padding: 20px 16px 16px; }
	.lic-calc-button { width: 100%; padding: 14px 20px; }
	.lic-calc-table { font-size: 12.5px; }
	.lic-calc-table thead tr:first-child th,
	.lic-calc-table thead tr:nth-child(2) th,
	.lic-calc-table tbody td { padding: 8px 10px; }
}
