/* ==========================================================================
   Laco Elevator Interactive Calculator - Stylesheet
   ========================================================================== */

:root {
	--laco-calc-primary: #357647;
	--laco-calc-primary-dark: #225330;
	--laco-calc-accent: #70a233;
	--laco-calc-text-main: #0f172a;
	--laco-calc-text-muted: #64748b;
	--laco-calc-border: #e2e8f0;
	--laco-calc-bg-light: #f8faf9;
}

.laco-calculator-wrapper {
	width: 100%;
	max-width: 1240px;
	margin: 30px auto 40px auto;
	font-family: inherit;
	color: var(--laco-calc-text-main);
	box-sizing: border-box;
}

.laco-calc-header {
	text-align: center;
	margin-bottom: 35px;
}

.laco-calc-header h2 {
	font-size: 28px;
	font-weight: 800;
	color: var(--laco-calc-primary);
	margin-bottom: 8px;
	letter-spacing: -0.5px;
}

.laco-calc-header p {
	font-size: 15px;
	color: var(--laco-calc-text-muted);
	max-width: 720px;
	margin: 0 auto;
	line-height: 1.6;
}

/* 2-Column Layout */
.laco-calc-split {
	display: grid;
	grid-template-columns: 1.75fr 1fr;
	gap: 30px;
	align-items: start;
}

/* Config Left Column */
.laco-calc-section-box {
	background: #ffffff;
	border: 1px solid var(--laco-calc-border);
	border-radius: 14px;
	padding: 26px 30px;
	margin-bottom: 25px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.laco-calc-section-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--laco-calc-primary-dark);
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 0;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid #edf2f7;
}

.laco-calc-step-badge {
	background: var(--laco-calc-primary);
	color: #ffffff;
	font-size: 13px;
	font-weight: 800;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.laco-param-group {
	margin-bottom: 22px;
}

.laco-param-label {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #475569;
	margin-bottom: 10px;
}

/* Dropdown Parameter Selectors (Row-by-Row Layout) */
.layout-dropdown .laco-param-group {
	margin-bottom: 16px;
}

.layout-dropdown .laco-param-label {
	margin-bottom: 6px;
}

.laco-select-wrapper {
	position: relative;
	width: 100%;
}

.laco-param-select {
	width: 100%;
	display: block;
	height: 46px;
	padding: 0 42px 0 16px;
	font-size: 14.5px;
	font-weight: 600;
	color: #1e293b;
	background-color: #ffffff;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	outline: none;
	transition: all 0.2s ease;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23357647' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px 18px;
}

.laco-param-select:hover {
	border-color: #94a3b8;
	background-color: #f8fafc;
}

.laco-param-select:focus {
	border-color: var(--laco-calc-primary);
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(53, 118, 71, 0.15);
}

.laco-param-select option {
	padding: 8px 12px;
	font-size: 14px;
	color: #1e293b;
	background-color: #ffffff;
}

/* Option Cards (Payloads, Speeds, Stops) */
.laco-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
}

.laco-option-card {
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	text-align: left;
	user-select: none;
}

.laco-option-card:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
	transform: translateY(-2px);
}

.laco-option-card.is-selected {
	border-color: var(--laco-calc-primary);
	background: #f0fdf4;
	box-shadow: 0 4px 12px rgba(53, 118, 71, 0.15);
}

.laco-option-card.is-selected::after {
	content: "✓";
	position: absolute;
	top: 8px;
	right: 10px;
	font-size: 12px;
	font-weight: 900;
	background: var(--laco-calc-primary);
	color: #ffffff;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.laco-card-title {
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 4px;
}

.laco-option-card.is-selected .laco-card-title {
	color: var(--laco-calc-primary);
}

.laco-card-subtitle {
	font-size: 11.5px;
	color: var(--laco-calc-text-muted);
	line-height: 1.4;
}

/* Cabin Material Cards & Badges */
.laco-cabin-cards-grid {
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.laco-cabin-surcharge-badge {
	display: inline-block;
	margin-top: 8px;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 11.5px;
	font-weight: 700;
	background: #f1f5f9;
	color: #475569;
	transition: all 0.2s ease;
}

.laco-option-card.is-selected .laco-cabin-surcharge-badge {
	background: #dcfce7;
	color: #166534;
}

/* Hardware Price Box */
.laco-hardware-price-box {
	background: linear-gradient(135deg, #f0fdf4, #e6f7ec);
	border: 1px solid #bbf7d0;
	border-radius: 10px;
	padding: 14px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 15px;
}

.laco-hw-label {
	font-size: 14px;
	font-weight: 600;
	color: #166534;
}

.laco-hw-value {
	font-size: 18px;
	font-weight: 800;
	color: var(--laco-calc-primary);
}

/* Services List (Part B) */
.laco-services-interactive-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.laco-service-item-card {
	display: flex;
	flex-direction: column;
	padding: 12px 16px;
	background: #ffffff;
	border: 1.5px solid var(--laco-calc-border);
	border-radius: 10px;
	transition: all 0.2s ease;
	cursor: pointer;
}

.laco-service-item-card:hover {
	border-color: #cbd5e1;
	background: #fafbfc;
}

.laco-service-item-card.is-active {
	border-color: #86efac;
	background: #fcfdfd;
}

/* Header row: Checkbox + Tên dịch vụ bên trái, Giá/Mô tả bên phải */
.laco-sv-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}

.laco-sv-title-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.laco-custom-checkbox {
	width: 19px;
	height: 19px;
	accent-color: var(--laco-calc-primary);
	cursor: pointer;
	flex-shrink: 0;
}

.laco-sv-name {
	font-size: 14.5px;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.35;
}

.laco-sv-right {
	text-align: right;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.laco-sv-calc-desc {
	font-size: 11.5px;
	color: #64748b;
	line-height: 1.3;
}

.laco-sv-price-tag {
	font-size: 14.5px;
	font-weight: 800;
	color: var(--laco-calc-primary);
	line-height: 1.3;
}

.laco-sv-price-tag.is-custom-text {
	font-size: 13px;
	font-weight: 700;
	color: #0284c7;
}

/* Details row: Subtitle & Package select trải rộng 100%, thẳng hàng tên */
.laco-sv-details-group {
	margin-left: 29px;
	margin-top: 3px;
	width: calc(100% - 29px);
}

.laco-sv-sub {
	font-size: 12px;
	color: var(--laco-calc-text-muted);
	line-height: 1.45;
}

.laco-sv-pkg-wrap {
	margin-top: 5px;
}

.laco-pkg-select {
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	max-width: 100%;
	background: #ffffff;
}

/* Cách 3: Tối ưu khi Ẩn Giá Dịch Vụ - Chuyển mô tả cách tính thành Badge Pill thanh lịch */
.laco-calculator-wrapper.hide-services-price .laco-sv-price-tag {
	display: none !important;
}

.laco-calculator-wrapper.hide-services-price .laco-sv-right {
	align-items: flex-end;
}

.laco-calculator-wrapper.hide-services-price .laco-sv-calc-desc {
	display: inline-block;
	background: #f1f5f9;
	color: #475569;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
	white-space: nowrap;
	border: 1px solid #e2e8f0;
}

.laco-calculator-wrapper.hide-services-price .laco-service-item-card.is-active .laco-sv-calc-desc {
	background: #dcfce7;
	color: #166534;
	border-color: #bbf7d0;
}

/* Sticky Summary Column Container (Right Column) */
.laco-calc-sticky-container {
	position: sticky;
	top: 90px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.laco-summary-card {
	background: #ffffff;
	border: 2px solid var(--laco-calc-primary);
	border-radius: 16px;
	padding: 26px 24px;
	box-shadow: 0 10px 30px rgba(53, 118, 71, 0.12);
}

.laco-summary-header {
	text-align: center;
	border-bottom: 2px solid #edf2f7;
	padding-bottom: 14px;
	margin-bottom: 16px;
}

.laco-summary-header h3 {
	font-size: 18px;
	font-weight: 800;
	color: var(--laco-calc-primary-dark);
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.laco-summary-header p {
	font-size: 12.5px;
	color: var(--laco-calc-text-muted);
	margin: 4px 0 0 0;
}

.laco-summary-section {
	margin-bottom: 16px;
}

.laco-sum-sec-title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 8px;
	letter-spacing: 0.5px;
}

.laco-sum-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13.5px;
	padding: 4px 0;
}

.laco-sum-item-name {
	color: #334155;
	flex: 1;
	padding-right: 10px;
}

.laco-sum-item-price {
	font-weight: 700;
	color: #0f172a;
	white-space: nowrap;
}

.laco-sum-sv-list {
	max-height: 240px;
	overflow-y: auto;
	padding-right: 4px;
}

.laco-sum-divider {
	height: 1px;
	background: #e2e8f0;
	margin: 14px 0;
}

/* Grand Total Box */
.laco-grand-total-box {
	background: #f1f8f3;
	border-radius: 10px;
	padding: 16px;
	text-align: center;
	margin: 18px 0 0 0;
}

.laco-grand-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: #166534;
	letter-spacing: 0.5px;
	display: block;
	margin-bottom: 4px;
}

.laco-grand-amount {
	font-size: 26px;
	font-weight: 900;
	color: var(--laco-calc-primary);
	letter-spacing: -0.5px;
	line-height: 1.2;
}

.laco-grand-note {
	font-size: 11.5px;
	color: #64748b;
	margin-top: 4px;
}

/* ==========================================================================
   SEPARATE HORIZONTAL ACTION BUTTONS ROW (DÀN HÀNG NGANG RIÊNG BIỆT)
   ========================================================================== */
.laco-actions-bar-row {
	width: 100%;
	margin-top: 35px;
	padding: 24px 30px;
	background: #ffffff;
	border: 1px solid var(--laco-calc-border);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
}

.laco-actions-bar-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.laco-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 28px;
	font-size: 15px;
	font-weight: 700;
	border-radius: 10px;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	flex: 1;
	min-width: 220px;
	max-width: 340px;
	text-align: center;
}

.laco-action-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.laco-action-btn:active {
	transform: translateY(0);
}

/* Button 1: Tải PDF */
.laco-btn-pdf {
	background: #ffffff;
	color: var(--laco-calc-primary);
	border: 2px solid var(--laco-calc-primary);
}

.laco-btn-pdf:hover {
	background: #f0fdf4;
	color: var(--laco-calc-primary-dark);
}

/* Button 2: In A4 */
.laco-btn-print {
	background: #f8fafc;
	color: #334155;
	border: 2px solid #cbd5e1;
}

.laco-btn-print:hover {
	background: #e2e8f0;
	color: #0f172a;
}

/* Button 3: Lưu Đơn & Khảo Sát (Nổi Bật Nhất) */
.laco-btn-submit-lead {
	background: linear-gradient(135deg, var(--laco-calc-primary), var(--laco-calc-accent));
	color: #ffffff;
	border: 2px solid transparent;
	box-shadow: 0 6px 18px rgba(53, 118, 71, 0.35);
}

.laco-btn-submit-lead:hover {
	background: linear-gradient(135deg, var(--laco-calc-primary-dark), var(--laco-calc-primary));
	box-shadow: 0 8px 24px rgba(53, 118, 71, 0.45);
	color: #ffffff;
}

/* ==========================================================================
   VERTICAL ACTION BUTTONS (SEPARATE CARD UNDER SUMMARY)
   ========================================================================== */
.laco-actions-vertical-card {
	background: #ffffff;
	border: 1px solid var(--laco-calc-border);
	border-radius: 16px;
	padding: 18px 20px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-sizing: border-box;
	width: 100%;
}

.laco-actions-vertical-card .laco-action-btn,
.laco-actions-vertical-box .laco-action-btn {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	padding: 13px 18px;
	font-size: 14.5px;
	text-align: center;
	justify-content: center;
}

/* ==========================================================================
   POPUP MODAL LEAD CAPTURE
   ========================================================================== */
.laco-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.laco-modal-backdrop.is-open {
	display: flex;
}

.laco-modal-dialog {
	background: #ffffff;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 40px);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	animation: lacoModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	display: flex;
	flex-direction: column;
}

.laco-modal-dialog form {
	display: flex;
	flex-direction: column;
	max-height: 100%;
	overflow: hidden;
	flex: 1 1 auto;
	margin: 0;
}

@keyframes lacoModalSlideUp {
	from { opacity: 0; transform: translateY(30px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.laco-modal-header {
	background: linear-gradient(135deg, var(--laco-calc-primary), var(--laco-calc-accent));
	padding: 20px 24px;
	color: #ffffff;
	position: relative;
	flex-shrink: 0;
}

.laco-modal-header h3 {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	color: #ffffff;
}

.laco-modal-header p {
	margin: 4px 0 0 0;
	font-size: 13px;
	opacity: 0.9;
	color: #ffffff;
}

.laco-modal-close {
	position: absolute;
	top: 16px;
	right: 18px;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #ffffff;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.laco-modal-close:hover {
	background: rgba(255, 255, 255, 0.35);
}

.laco-modal-body {
	padding: 20px 24px;
	overflow-y: auto;
	flex: 1 1 auto;
	overscroll-behavior: contain;
}

.laco-form-group {
	margin-bottom: 16px;
}

.laco-form-group label {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	color: #334155;
	margin-bottom: 6px;
}

.laco-form-group label span.req {
	color: #ef4444;
}

.laco-form-input,
.laco-form-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.2s;
}

.laco-form-input:focus,
.laco-form-textarea:focus {
	border-color: var(--laco-calc-primary);
	box-shadow: 0 0 0 3px rgba(53, 118, 71, 0.15);
	outline: none;
}

.laco-modal-footer {
	padding: 14px 24px 18px 24px;
	text-align: right;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	flex-shrink: 0;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	position: sticky;
	bottom: 0;
	z-index: 10;
}

/* ==========================================================================
   PRINTABLE A4 QUOTE SHEET STYLING
   ========================================================================== */
#laco-printable-quote {
	display: none;
}

@media print {
	#laco-printable-quote {
		display: none !important;
	}
}

.laco-print-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	border-bottom: 2.5px solid #357647;
	padding-bottom: 12px;
	margin-bottom: 16px;
}

.laco-print-company h2 {
	margin: 0;
	color: #357647;
	font-size: 15pt;
	font-weight: bold;
	letter-spacing: -0.3px;
}

.laco-print-company p {
	margin: 2px 0;
	font-size: 9pt;
	color: #475569;
}

.laco-print-meta {
	text-align: right;
	font-size: 9.5pt;
	color: #334155;
	white-space: nowrap;
}

.laco-print-meta p {
	margin: 2px 0;
}

.laco-print-meta strong {
	color: #0f172a;
}

.laco-print-title {
	text-align: center;
	margin: 14px 0 16px 0;
}

.laco-print-title h1 {
	font-size: 13.5pt;
	font-weight: bold;
	color: #1e293b;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.laco-print-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
	page-break-inside: avoid;
}

.laco-print-table th,
.laco-print-table td {
	border: 1px solid #cbd5e1;
	padding: 7px 10px;
	font-size: 9.5pt;
}

.laco-print-table th {
	background: #f1f5f9 !important;
	color: #1e293b;
	font-weight: bold;
	text-align: left;
}

.laco-print-grand {
	text-align: right;
	font-size: 12.5pt;
	font-weight: bold;
	color: #357647;
	margin: 14px 0 20px 0;
	padding: 8px 12px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 4px;
}

.laco-print-footer-simple {
	text-align: center;
	margin-top: 25px;
	padding-top: 15px;
	border-top: 1px solid #cbd5e1;
	page-break-inside: avoid;
}

/* Responsive adjustments */
@media (max-width: 960px) {
	.laco-calc-split {
		grid-template-columns: 1fr;
	}

	.laco-calc-sticky-container,
	.laco-summary-card {
		position: static;
	}

	.laco-actions-bar-inner {
		flex-direction: column;
	}

	.laco-action-btn {
		width: 100%;
		max-width: 100%;
	}
}

/* Tối ưu chuyên sâu cho màn hình Mobile (Cách 1 & Cách 3) */
@media (max-width: 768px) {
	.laco-services-interactive-list {
		gap: 8px;
	}

	.laco-service-item-card {
		padding: 10px 12px;
		border-radius: 8px;
	}

	.laco-sv-header-row {
		gap: 8px;
	}

	.laco-sv-title-group {
		gap: 8px;
	}

	.laco-custom-checkbox {
		width: 18px;
		height: 18px;
	}

	.laco-sv-name {
		font-size: 13.5px;
	}

	.laco-sv-details-group {
		margin-left: 26px;
		margin-top: 2px;
		width: calc(100% - 26px);
	}

	.laco-sv-sub {
		font-size: 11.5px;
		line-height: 1.4;
	}

	.laco-sv-price-tag {
		font-size: 13.5px;
	}

	.laco-sv-calc-desc {
		font-size: 11px;
	}
}

/* Consult notice callout when services are selected with hidden prices */
.laco-services-consult-notice {
	margin-top: 14px;
	padding: 11px 14px;
	background: #f0fdf4;
	border: 1px solid #86efac;
	border-radius: 8px;
	color: #166534;
	font-size: 13px;
	line-height: 1.5;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	animation: lacoNoticeFadeIn 0.3s ease-out;
}

.laco-services-consult-notice strong {
	color: #15803d;
}

@keyframes lacoNoticeFadeIn {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.laco-calculator-wrapper.hide-services-price .laco-sv-price-tag:empty {
	display: none;
}

/* Incompatible option cards */
.laco-option-card.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	background: #f8fafc !important;
	border-color: #e2e8f0 !important;
	box-shadow: none !important;
}
.laco-option-card.is-disabled:hover {
	border-color: #e2e8f0 !important;
	transform: none !important;
}


