/* ============================================================
   Công cụ tính toán dầm uốn — formula-dam-uon.css
   ============================================================ */

/* ── Helpers ── */
.formula-dam-uon .hidden { display: none !important; }

/* ── Intro box ── */
.cb-intro-section { padding: 28px 0 0; }

.nmlbox.graybg.cb-intro-box {
	background: #f5f7fb;
	border: 1px solid #e2e8f2;
	border-radius: 10px;
	padding: 18px 22px;
	font-size: 14px;
	line-height: 1.8;
	color: #485a7d;
	margin-bottom: 0;
}

/* ── Tab navigation ── */
.cb-main-section { padding: 28px 0 56px; }

.cb-tab-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 28px;
}

.cb-tab-btn {
	padding: 9px 16px;
	background: #fff;
	border: 2px solid #e2e8f2;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	font-size: 13px;
	font-weight: 500;
	color: #485a7d;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}

.cb-tab-btn:hover  { background: var(--at-accent); }
.cb-tab-btn.active {
	background: var(--at-accent);
	color: #fff;
}

@media (max-width: 768px) {
	.cb-tab-btn { font-size: 12px; padding: 7px 10px; }
}

/* ── Formula row (diagram + step2 panel) ── */
.cb-formula-row {
	display: flex;
	gap: 20px;
	margin-bottom: 24px;
}

.step2_left.border {
	flex: 0 0 300px;
	min-width: 160px;
	background: #fff;
}

.step2_right.border {
	flex: 1;
	min-width: 0;
	background: #fff;
}

.border {
	border: 1px solid #d1d9e8;
	border-radius: 10px;
	padding: 16px;
}

@media (max-width: 768px) {
	.cb-formula-row { flex-direction: column; }
	.step2_left.border { flex: none; }
}

/* ── Step header ── */
.step_header { margin: 18px 0 10px; }
.step { color: #2563eb; font-weight: 700; }
.step_header strong { font-weight: 700; color: #1a2540; }

/* ── Cross-section thumbnail grid ── */
table.danmen {
	width: 100%;
	border-collapse: collapse;
}

table.danmen td {
	padding: 6px;
	text-align: center;
	cursor: pointer;
}

table.danmen td.color_any {
	background: #f5f7fb;
	border-radius: 6px;
	font-size: 12px;
	vertical-align: top;
	cursor: default;
}

table.danmen td a {
	display: inline-block;
	transition: opacity 0.15s;
}

table.danmen td a:hover { opacity: 0.75; }

table.danmen img {
	display: block;
	max-width: 70px;
	height: auto;
}

/* Info text column on the right (rowspan) */
table.danmen td.danmen-info-col {
	width: 200px;
	min-width: 180px;
	vertical-align: middle;
	padding: 12px 14px;
	border-left: 2px solid #e2e8f2;
	line-height: 1.7;
	cursor: default;
}

.cb-sec-placeholder {
	width: 60px;
	height: 60px;
	background: #e8ecf4;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	color: #a0aec0;
	margin: 0 auto;
}

/* ── Selected section view ── */
.img_center { display: block; margin: 0 auto; max-width: 100%; height: auto; }

.clickable { color: #2563eb; cursor: pointer; text-decoration: underline; }
.text_center { text-align: center; }
.text_small  { font-size: 12px; }
.strong      { font-weight: 700; }

/* ── Form inputs ── */
.input_head_m, .input_head {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 5px;
	font-size: 13px;
	font-weight: 600;
	margin-right: 8px;
}

/* color bands */
.head_color_1 { background: #e8f0fe; color: #1d4ed8; }
.head_color_2 { background: #fef9c3; color: #854d0e; }
.head_color_3 { background: #dcfce7; color: #166534; }
.head_color_4 { background: #ede9fe; color: #5b21b6; }
.head_color_5 { background: #fce7f3; color: #9d174d; }

.input_value {
	padding: 6px 10px;
	border: 1px solid #d1d9e8;
	border-radius: 6px;
	font-size: 14px;
	width: 100px;
	transition: border-color 0.2s;
}

.input_value:focus {
	outline: none;
	border-color: #3b7fe8;
	box-shadow: 0 0 0 3px rgba(59,127,232,.12);
}

.input_value.readonly,
.input_value[readonly] {
	background: #f5f7fb;
	color: #485a7d;
	cursor: default;
}

.output_value.input_value {
	font-weight: 700;
	color: #2563eb;
}

.mobile_value, .mobile_head { display: none; }

/* ── Material select ── */
.select_materials {
	padding: 8px 36px 8px 12px;
	border: 1px solid #d1d9e8;
	border-radius: 7px;
	font-size: 14px;
	color: #1a2540;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23485a7d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	appearance: none;
	-webkit-appearance: none;
	min-width: 260px;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.select_materials:focus {
	outline: none;
	border-color: #3b7fe8;
	box-shadow: 0 0 0 3px rgba(59,127,232,.12);
}

/* ── 2-column form layout ── */
.cb-form-cols {
	display: flex;
	gap: 32px;
	align-items: flex-start;
	margin-top: 8px;
}

.cb-form-left {
	flex: 1 1 0;
	min-width: 0;
}

.cb-form-right {
	flex: 0 0 320px;
	min-width: 240px;
	position: sticky;
	top: 80px;
}

.cb-form-right .formula2 {
	margin-top: 0;
}

.cb-form-right .output_values {
	border-top: 2px solid #e2e8f2;
	margin-top: 16px;
	padding-top: 16px;
}

@media (max-width: 900px) {
	.cb-form-cols { flex-direction: column; }
	.cb-form-right { flex: none; width: 100%; position: static; min-width: 0; }
}

/* ── Calc / Reset buttons ── */
input[type="button"],
input[type="reset"] {
	padding: 9px 22px;
	border: none;
	border-radius: 7px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s;
}

input[type="button"] {
	background: linear-gradient(135deg,#3b7fe8,#2563eb);
	color: #fff;
	margin-right: 10px;
}

input[type="reset"] {
	background: #f5f7fb;
	color: #485a7d;
	border: 1px solid #d1d9e8;
}

input[type="button"]:hover,
input[type="reset"]:hover { opacity: 0.85; }

/* ── Error message ── */
.error {
	color: #dc2626;
	font-size: 13px;
	font-weight: 600;
	min-height: 18px;
	margin: 6px 0;
}

/* ── Formula display box ── */
.formula1 {
	background: #f5f7fb;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 13px;
	margin-left: 20px;
	color: #485a7d;
	min-width: 220px;
}

.formula2 {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	padding: 14px 18px;
	font-size: 13px;
	line-height: 1.9;
	color: #1e40af;
	margin: 16px 0;
}

.formula2 .formula_result {
	font-weight: 700;
	color: #1d4ed8;
}

/* ── float_left inside the section area ── */
.float_left { float: left; margin-right: 20px; margin-bottom: 10px; }
.clear      { clear: both; overflow: hidden; }
.clear::after { content: ''; display: table; clear: both; }

/* ── Results output block ── */
.output_values {
	border-top: 1px solid #e2e8f2;
	margin-top: 20px;
	padding-top: 16px;
}

/* ── "Coming soon" panel ── */
.cb-coming-soon {
	padding: 48px;
	text-align: center;
	color: #a0aec0;
	font-size: 15px;
	border: 2px dashed #e2e8f2;
	border-radius: 12px;
}

/* ── Paragraph spacing inside continuous-beam ── */
.continuous-beam p {
	margin: 6px 0;
	font-size: 14px;
	line-height: 1.7;
}

.continuous-beam p:empty { margin: 0; height: 0; padding: 0; }

/* ── Step 1 overview table ── */
.tbl_swht {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.tbl_swht td {
	padding: 8px;
	text-align: center;
}

.tbl_swht img {
	max-width: 120px;
	height: auto;
	display: block;
	margin: 0 auto;
	cursor: pointer;
	border: 2px solid transparent;
	border-radius: 6px;
	transition: border-color 0.15s, opacity 0.15s;
}

.tbl_swht img:hover { border-color: #3b7fe8; opacity: 0.85; }
