/**
 * RO Concrete Column Design Calculator
 * Frontend UI
 */

.roccd-wrap {
	--roccd-header-color-1: #07569A;
	--roccd-header-color-2: #00AEB5;
	--roccd-header-text: #FFFFFF;
	--roccd-body-background: #F7F9FC;
	--roccd-card-background: #FFFFFF;
	--roccd-accent: #07569A;
	--roccd-button: #07569A;
	--roccd-button-text: #FFFFFF;

	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 0;
	background: var(--roccd-body-background);
	color: #263238;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.roccd-wrap *,
.roccd-wrap *::before,
.roccd-wrap *::after {
	box-sizing: border-box;
}

/* Header */

.roccd-header {
	background: linear-gradient(
		135deg,
		var(--roccd-header-color-1),
		var(--roccd-header-color-2)
	);
	color: var(--roccd-header-text);
	padding: 28px 32px;
	border-radius: 14px 14px 0 0;
	box-shadow: 0 8px 25px rgba(0, 0, 0, .10);
}

.roccd-header h2 {
	margin: 0 0 7px;
	padding: 0;
	color: #fff;
	font-size: 26px;
	line-height: 1.25;
	font-weight: 700;
}

.roccd-subtitle {
	color: #fff;
	opacity: .94;
	font-size: 14px;
}

/* Main card */

.roccd-card {
	background: var(--roccd-card-background);
	border-radius: 0 0 14px 14px;
	padding: 28px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .10);
}

/* Form sections */

.roccd-form h3 {
	margin: 0 0 16px;
	padding: 0 0 10px;
	border-bottom: 2px solid #e8eef4;
	color: var(--roccd-accent);
	font-size: 18px;
	font-weight: 700;
}

.roccd-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.roccd-field {
	min-width: 0;
}

.roccd-field label {
	display: block;
	margin-bottom: 7px;
	color: #37474f;
	font-size: 13px;
	font-weight: 600;
}

.roccd-input {
	display: block;
	width: 100%;
	height: 44px;
	padding: 9px 12px;
	border: 1px solid #d6dfe7;
	border-radius: 8px;
	background: #fff;
	color: #263238;
	font-size: 14px;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.roccd-input:focus {
	border-color: var(--roccd-accent);
	box-shadow: 0 0 0 3px rgba(7, 86, 154, .10);
}

/* Actions */

.roccd-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	padding-top: 4px;
	margin-bottom: 28px;
}

.roccd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 45px;
	padding: 11px 22px;
	border: 0;
	border-radius: 8px;
	background: var(--roccd-button);
	color: var(--roccd-button-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	box-shadow: 0 5px 14px rgba(0, 0, 0, .15);
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.roccd-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 7px 18px rgba(0, 0, 0, .18);
}

.roccd-btn:active {
	transform: translateY(0);
}

.roccd-btn-secondary {
	background: #607d8b;
}

/* Results */

.roccd-results {
	display: none;
	margin-top: 10px;
}

.roccd-results.roccd-show {
	display: block;
}

.roccd-result-summary {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 22px;
}

.roccd-result-box {
	padding: 17px;
	border: 1px solid #e0e7ed;
	border-radius: 10px;
	background: #f8fafc;
}

.roccd-result-label {
	margin-bottom: 5px;
	color: #607d8b;
	font-size: 12px;
	font-weight: 600;
}

.roccd-result-value {
	color: #263238;
	font-size: 20px;
	font-weight: 700;
}

.roccd-result-unit {
	margin-left: 3px;
	color: #607d8b;
	font-size: 12px;
	font-weight: 500;
}

/* Status */

.roccd-status {
	margin-bottom: 22px;
	padding: 14px 16px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 700;
}

.roccd-status.pass {
	background: #e8f5e9;
	border: 1px solid #b7dfba;
	color: #256029;
}

.roccd-status.warning {
	background: #fff8e1;
	border: 1px solid #f0d58a;
	color: #765600;
}

.roccd-status.fail {
	background: #ffebee;
	border: 1px solid #efb0b8;
	color: #a51d2a;
}

/* Results columns */

.roccd-results-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
	gap: 22px;
	align-items: start;
}

.roccd-result-panel {
	border: 1px solid #e0e7ed;
	border-radius: 11px;
	overflow: hidden;
	background: #fff;
}

.roccd-panel-title {
	padding: 13px 16px;
	background: #f4f7fa;
	border-bottom: 1px solid #e0e7ed;
	color: #07569a;
	font-size: 15px;
	font-weight: 700;
}

.roccd-result-table {
	width: 100%;
	border-collapse: collapse;
}

.roccd-result-table td {
	padding: 10px 14px;
	border-bottom: 1px solid #edf1f4;
	font-size: 13px;
}

.roccd-result-table tr:last-child td {
	border-bottom: 0;
}

.roccd-result-table td:last-child {
	text-align: right;
	font-weight: 700;
}

/* SVG */

.roccd-diagram {
	width: 100%;
	min-height: 420px;
	padding: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fafcfe;
}

.roccd-diagram svg {
	display: block;
	width: 100%;
	max-width: 520px;
	height: auto;
}

.roccd-svg-concrete {
	fill: #d9dde2;
	stroke: #263238;
	stroke-width: 2;
}

.roccd-svg-steel {
	fill: #07569a;
	stroke: #063e70;
	stroke-width: 1.5;
}

.roccd-svg-dimension {
	stroke: #455a64;
	stroke-width: 1.5;
	fill: none;
}

.roccd-svg-dimension-text {
	fill: #263238;
	font-size: 13px;
	font-weight: 600;
}

.roccd-svg-label {
	fill: #07569a;
	font-size: 13px;
	font-weight: 700;
}

.roccd-svg-title {
	fill: #263238;
	font-size: 16px;
	font-weight: 700;
}

/* Formula / notes */

.roccd-notes {
	margin-top: 22px;
	padding: 16px;
	border-radius: 9px;
	background: #f5f8fb;
	border: 1px solid #e0e7ed;
}

.roccd-notes strong {
	color: #07569a;
}

.roccd-footer {
	text-align: center;
	padding: 16px 10px 5px;
	font-size: 13px;
	line-height: 1.5;
}

.roccd-footer a {
	color: var(--roccd-accent);
	text-decoration: none;
}

.roccd-footer a:hover {
	text-decoration: underline;
}

/* Mobile */

@media screen and (max-width: 900px) {

	.roccd-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.roccd-result-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.roccd-results-layout {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 600px) {

	.roccd-wrap {
		padding: 8px 0;
	}

	.roccd-header {
		padding: 22px 18px;
		border-radius: 10px 10px 0 0;
	}

	.roccd-header h2 {
		font-size: 21px;
	}

	.roccd-card {
		padding: 18px;
		border-radius: 0 0 10px 10px;
	}

	.roccd-grid {
		grid-template-columns: 1fr;
		gap: 13px;
	}

	.roccd-result-summary {
		grid-template-columns: 1fr 1fr;
	}

	.roccd-result-value {
		font-size: 17px;
	}

	.roccd-actions {
		flex-direction: column;
	}

	.roccd-btn {
		width: 100%;
	}
}