/* Módulo cotizador — ubold */
.cot-page {
	--cot-radius: .45rem;
	padding-bottom: 2rem;
}

.cot-hero {
	background: linear-gradient(135deg, #f4f8fc 0%, #eaf2f9 100%);
	border: 1px solid #dde6ef;
	border-left: 4px solid #1761fd;
	border-radius: var(--cot-radius);
	padding: 1.15rem 1.25rem;
	margin-bottom: 1rem;
}

.cot-hero h4 {
	margin: 0 0 .35rem;
	font-weight: 600;
	color: #1761fd;
	font-size: 1.15rem;
}

.cot-hero p {
	margin: 0;
	color: #8a9bab;
	font-size: .9rem;
}

.cot-card {
	border: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
	border-radius: var(--cot-radius);
	margin-bottom: 1rem;
	overflow: hidden;
}

/* Secciones con color distintivo */
.cot-section-cliente {
	background: #f3f8ff;
	border: 1px solid #d4e4ff;
}

.cot-section-cliente .card-header {
	background: #e8f1ff;
	border-bottom-color: #cfe0ff;
	color: #1a4a8a;
}

.cot-section-cliente .card-header i {
	color: #3b7ddd;
}

.cot-section-cliente .card-body {
	background: #f8fbff;
}

.cot-section-ruta {
	background: #f0fdf7;
	border: 1px solid #c6f0df;
}

.cot-section-ruta .card-header {
	background: #e3faf0;
	border-bottom-color: #b8efd8;
	color: #0d6b4d;
}

.cot-section-ruta .card-header i {
	color: #0acf97;
}

.cot-section-ruta .card-body {
	background: #f7fffb;
}

.cot-section-empaques {
	background: #fffbf3;
	border: 1px solid #fde8b8;
}

.cot-section-empaques .card-header {
	background: #fff4dc;
	border-bottom-color: #f9dea8;
	color: #8a5a00;
}

.cot-section-empaques .card-header i {
	color: #f59e0b;
}

.cot-section-empaques .card-body,
.cot-section-empaques .cot-table-wrap {
	background: #fffdf8;
}

.cot-section-empaques .cot-table-scroll-hint {
	background: #fff8eb;
	border-bottom-color: #fde8b8;
}

.cot-section-empaques .cot-tfoot-totals td {
	background: #fff4dc;
}

.cot-cobertura-status {
	padding: .45rem .65rem;
	border-radius: .35rem;
	line-height: 1.35;
}

.cot-cobertura-status.ok {
	background: #e8faf3;
	color: #0d6b4d;
	border: 1px solid #b8efd8;
}

.cot-cobertura-status.error {
	background: #fdecea;
	color: #b02a37;
	border: 1px solid #f5c2c7;
}

.cot-cobertura-status.warn {
	background: #fff8e6;
	color: #856404;
	border: 1px solid #ffe69c;
}

/* Asistente móvil paso a paso */
.cot-mobile-wizard {
	background: #fff;
	border: 1px solid #e3e8ef;
	border-radius: var(--cot-radius);
	padding: .85rem 1rem;
	margin-bottom: .85rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.cot-wiz-progress {
	display: flex;
	justify-content: space-between;
	gap: .35rem;
	margin-bottom: .5rem;
}

.cot-wiz-step-item {
	flex: 1;
	text-align: center;
	opacity: .45;
	transition: opacity .2s;
}

.cot-wiz-step-item.active,
.cot-wiz-step-item.done {
	opacity: 1;
}

.cot-wiz-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.65rem;
	height: 1.65rem;
	border-radius: 50%;
	background: #e9ecef;
	color: #6c757d;
	font-size: .75rem;
	font-weight: 700;
	margin-bottom: .15rem;
}

.cot-wiz-step-item.active .cot-wiz-num {
	background: #1761fd;
	color: #fff;
}

.cot-wiz-step-item.done .cot-wiz-num {
	background: #0acf97;
	color: #fff;
}

.cot-wiz-step-item .cot-wiz-label {
	display: block;
	font-size: .68rem;
	font-weight: 600;
	color: #6c757d;
	line-height: 1.2;
}

.cot-wiz-step-item.active .cot-wiz-label {
	color: #1761fd;
}

.cot-wiz-caption {
	font-size: .78rem;
	color: #8a9bab;
	text-align: center;
}

.cot-wizard-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .5rem;
	margin-bottom: 1rem;
	padding: .65rem .75rem;
	background: #fff;
	border: 1px solid #e3e8ef;
	border-radius: var(--cot-radius);
}

.cot-wizard-nav .btn {
	min-width: 7rem;
}

.cot-card .card-header {
	background: #f8f9fc;
	border-bottom: 1px solid #eef1f6;
	font-weight: 600;
	font-size: .9rem;
	padding: .65rem 1rem;
}

.cot-card .card-header i {
	margin-right: .35rem;
	color: #1761fd;
}

.cot-label-req::after {
	content: ' *';
	color: #f1556c;
}

.cot-cliente-modo .btn {
	font-size: .8rem;
}

.cot-aprox-note {
	background: #fff8e6;
	border-top: 1px solid #ffe69c;
	color: #664d03;
	font-size: .78rem;
	line-height: 1.45;
	padding: .65rem .9rem;
	text-align: center;
}

.cot-aprox-note .mdi {
	font-size: 1rem;
	vertical-align: -2px;
	margin-right: .2rem;
	opacity: .9;
}

.cot-total-box .cot-total-label {
	color: rgba(255, 255, 255, .88);
	font-size: .78rem;
	font-weight: 500;
	letter-spacing: .02em;
	margin-bottom: .15rem;
}

.cot-modal-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, .5);
	z-index: 1050;
}

.cot-modal-overlay.show {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cot-modal-email {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
	max-width: 420px;
	width: 100%;
	padding: 24px;
}

.cot-modal-email h3 {
	margin: 0 0 16px;
	font-size: 1.15rem;
	color: #333;
}

.cot-modal-email label {
	display: block;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
	font-size: .875rem;
}

.cot-modal-hint {
	font-size: 12px;
	color: #666;
	margin-top: 6px;
	margin-bottom: 0;
}

.cot-modal-error {
	color: #c00;
	font-size: 13px;
	margin-top: 8px;
	display: none;
}

.cot-modal-actions {
	margin-top: 20px;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.cot-summary-sticky {
	position: sticky;
	top: 70px;
}

.cot-summary-card .cot-total-box {
	background: linear-gradient(135deg, #1761fd 0%, #0d47a1 100%);
	color: #fff;
	padding: 1rem 1.15rem;
	text-align: center;
}

.cot-total-amount {
	font-size: 1.85rem;
	font-weight: 700;
	line-height: 1.2;
}

.cot-resumen-list .list-group-item {
	font-size: .85rem;
	padding: .55rem 1rem;
	border-color: #f0f2f7;
}

.cot-lines-table {
	font-size: .78rem;
}

.cot-lines-table thead th {
	background: #f8f9fc;
	border-top: none;
	white-space: nowrap;
	vertical-align: middle;
}

.cot-lines-table td {
	vertical-align: middle;
	padding: .35rem .25rem;
}

.cot-lines-table input.form-control,
.cot-lines-table select.form-control {
	font-size: .75rem;
	padding: .2rem .35rem;
	height: calc(1.4em + .4rem + 2px);
	min-width: 48px;
}

.cot-lines-table .cot-col-desc input {
	min-width: 70px;
}

.cot-tfoot-totals td {
	background: #f8f9fc;
	font-size: .8rem;
}

.cot-tarifa-status.loading {
	color: #1761fd;
}

.cot-tarifa-status.ok {
	color: #0acf97;
}

.cot-tarifa-status.error {
	color: #f1556c;
}

.cot-actions .btn:disabled {
	opacity: .55;
}

.cot-field-readonly,
.cot-lines-table input[readonly],
.cot-lines-table input[readonly]:focus {
	background-color: #eef1f6 !important;
	color: #6c757d;
	border-color: #dee2e6 !important;
	cursor: not-allowed;
	box-shadow: none !important;
}

.cot-field-valid,
#CotizadorModForm select.cot-field-valid + .select2-container .select2-selection--single {
	border-color: #1abc9c !important;
	box-shadow: 0 0 0 .12rem rgba(26, 188, 156, .15);
}

.cot-field-invalid,
#CotizadorModForm select.cot-field-invalid + .select2-container .select2-selection--single {
	border-color: #f1556c !important;
	box-shadow: 0 0 0 .12rem rgba(241, 85, 108, .15);
}

.cot-lines-table input.cot-field-valid {
	border-color: #1abc9c !important;
}

.cot-lines-table input.cot-field-invalid {
	border-color: #f1556c !important;
}

.cot-card-header-flex {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
}

.cot-table-wrap {
	position: relative;
}

.cot-table-scroll-hint {
	font-size: .72rem;
	color: #8a9bab;
	padding: .45rem .75rem;
	background: #f8f9fc;
	border-bottom: 1px solid #eef1f6;
	text-align: center;
}

.cot-lines-scroll {
	-webkit-overflow-scrolling: touch;
}

.cot-lines-scroll .cot-lines-table {
	min-width: 820px;
}

.cot-resumen-list .list-group-item span:first-child {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: .5rem;
}

.cot-resumen-list .list-group-item strong {
	flex: 0 0 auto;
	white-space: nowrap;
}

@media (max-width: 991px) {
	.cot-summary-sticky {
		position: static;
		margin-bottom: 1rem;
	}

	.cot-summary-card {
		margin-bottom: 0;
	}

	.cot-total-amount {
		font-size: 1.55rem;
	}
}

@media (min-width: 768px) {
	.cot-wizard-step {
		display: block !important;
	}
}

@media (max-width: 767px) {
	.cot-page {
		padding-bottom: 1.25rem;
	}

	.cot-wizard-step {
		display: none;
	}

	.cot-wizard-step.is-active {
		display: block;
	}

	.cot-hero {
		padding: .9rem 1rem;
	}

	.cot-hero h4 {
		font-size: 1.05rem;
	}

	.cot-hero p {
		font-size: .82rem;
	}

	.cot-hero .btn,
	.cot-hero .badge {
		width: 100%;
		margin-left: 0 !important;
		margin-top: .35rem;
		text-align: center;
	}

	.cot-card .card-body {
		padding: .85rem;
	}

	/* Tabla empaques → tarjetas apiladas */
	.cot-table-scroll-hint,
	.cot-lines-table thead,
	.cot-lines-table tfoot {
		display: none;
	}

	.cot-lines-scroll {
		overflow: visible;
	}

	.cot-lines-scroll .cot-lines-table {
		min-width: 0;
	}

	.cot-lines-table tbody tr {
		display: block;
		margin: .65rem .75rem;
		padding: .5rem .65rem .35rem;
		border: 1px solid #e3e8ef;
		border-radius: var(--cot-radius);
		background: #fff;
		box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
	}

	.cot-lines-table tbody td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: .5rem;
		padding: .35rem 0;
		border: none;
		border-bottom: 1px solid #f0f2f7;
	}

	.cot-lines-table tbody td:last-child {
		border-bottom: none;
		justify-content: flex-end;
		padding-top: .5rem;
	}

	.cot-lines-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		font-size: .72rem;
		color: #6c757d;
		flex: 0 0 38%;
		max-width: 38%;
	}

	.cot-lines-table tbody td.cot-line-actions::before {
		display: none;
	}

	.cot-lines-table tbody td .form-control,
	.cot-lines-table tbody td select.form-control {
		flex: 1 1 58%;
		max-width: 58%;
		min-width: 0;
	}

	.cot-lines-table .cot-col-desc input {
		min-width: 0;
	}
}

@media (max-width: 575px) {
	.cot-page .form-group.col-6 {
		flex: 0 0 100%;
		max-width: 100%;
	}
}
