/* Jhon990 Calculator Suite - Frontend Styles */
.acp-wrapper {
	max-width: 380px;
	margin: 20px auto;
	padding: 18px;
	border: 2px solid #2271b1;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.acp-wrapper * { box-sizing: border-box; }

.acp-title {
	margin: 0 0 12px;
	font-size: 18px;
	text-align: center;
	color: #222;
}

.acp-display {
	background: #1c1f26;
	color: #fff;
	border-radius: 10px;
	padding: 16px 14px;
	margin-bottom: 14px;
	min-height: 56px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}
.acp-expression {
	font-size: 26px;
	word-break: break-all;
	text-align: right;
	width: 100%;
}

.acp-keys {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}
.acp-sci-keys { grid-template-columns: repeat(5, 1fr); }

.acp-key {
	padding: 14px 0;
	border: none;
	border-radius: 8px;
	background: #f0f1f5;
	font-size: 16px;
	cursor: pointer;
	transition: transform .08s ease, background .15s ease;
}
.acp-key:hover { background: #e2e5ec; }
.acp-key:active { transform: scale(0.95); }
.acp-key.acp-op { background: #ffe9d6; color: #b35900; }
.acp-key.acp-fn { background: #e6f0ff; color: #0a4fa3; font-size: 13px; }
.acp-key.acp-clear { background: #ffdede; color: #b30000; }
.acp-key.acp-equal { background: var(--acp-theme, #2271b1); color: #fff; }
.acp-key.acp-zero { grid-column: span 1; }

.acp-history {
	margin-top: 12px;
	font-size: 12px;
	color: #777;
	max-height: 90px;
	overflow-y: auto;
}
.acp-history div { padding: 2px 0; border-bottom: 1px dashed #eee; }

/* Forms (loan/bmi/percentage/currency) */
.acp-form { display: flex; flex-direction: column; gap: 10px; }
.acp-form label {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	color: #444;
	gap: 4px;
}
.acp-form input[type="number"] {
	padding: 10px 12px;
	border: 1px solid #ccd0d6;
	border-radius: 8px;
	font-size: 15px;
}
.acp-form input[type="number"]:focus {
	outline: none;
	border-color: var(--acp-theme, #2271b1);
	box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}
.acp-btn {
	margin-top: 4px;
	padding: 12px;
	border: none;
	border-radius: 8px;
	background: var(--acp-theme, #2271b1);
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	transition: opacity .15s ease;
}
.acp-btn:hover { opacity: .9; }

.acp-result {
	margin-top: 16px;
	background: #f7f9fb;
	border-radius: 10px;
	padding: 12px 14px;
}
.acp-result-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 14px;
	border-bottom: 1px solid #e9ecf0;
}
.acp-result-row:last-child { border-bottom: none; }
.acp-result-row strong { color: var(--acp-theme, #2271b1); }

.acp-note { font-size: 12px; color: #888; margin: 0 0 10px; }

/* Tabs (all-in-one) */
.acp-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}
.acp-tab-btn {
	flex: 1 1 auto;
	padding: 8px 10px;
	border: 1px solid #ddd;
	background: #fafbfc;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
}
.acp-tab-btn.active {
	background: var(--acp-theme, #2271b1);
	color: #fff;
	border-color: var(--acp-theme, #2271b1);
}
.acp-tab-pane { display: none; }
.acp-tab-pane.active { display: block; }
.acp-tab-pane .acp-wrapper { border: none; box-shadow: none; padding: 0; margin: 0; max-width: 100%; }

@media (max-width: 420px) {
	.acp-wrapper { max-width: 100%; }
}
