/* Compracar Financiamiento — modal */
.ccf {
	--ccf-azul: #1a3f7b;
	--ccf-rojo: #ba1818;
	--ccf-texto: #1f2a44;
	--ccf-borde: #d6dbe4;
	--ccf-gris: #eef0f3;
	--ccf-ph: #9aa3b2;
	width: min(820px, calc(100% - 24px));
	max-height: calc(100dvh - 24px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: var(--ccf-texto);
	font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-weight: 400;
	box-shadow: 0 24px 60px rgba(16, 32, 64, .28);
	overflow: auto;
	overscroll-behavior: contain;
}
.ccf, .ccf * { font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.ccf::backdrop { background: rgba(14, 27, 52, .55); }
.ccf[open] { animation: ccf-in .18s ease-out; }
@keyframes ccf-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .ccf[open] { animation: none; } }
html:has(.ccf[open]) { overflow: hidden; }

.ccf .ccf-form,
.ccf .ccf-ok { position: relative; padding: 44px 46px 40px; }
.ccf .ccf-ok { text-align: center; padding-top: 56px; }
.ccf [hidden] { display: none !important; }

.ccf .ccf-h {
	margin: 0 0 6px;
	color: var(--ccf-azul);
	font-size: clamp(26px, 4.2vw, 36px); font-weight: 700; line-height: 1.15; font-family: inherit;
	letter-spacing: -.01em;
	text-align: center;
}
.ccf .ccf-sub { margin: 0 0 26px; text-align: center; font-size: 16px; font-weight: 400; line-height: 1.5; color: #4a5470; }

.ccf .ccf-x {
	position: absolute; top: 18px; right: 18px;
	width: 44px; height: 44px; padding: 6px;
	border: 0; background: none; cursor: pointer; border-radius: 8px;
}
.ccf .ccf-x svg { width: 100%; height: 100%; stroke: var(--ccf-rojo); stroke-width: 1.6; fill: none; }
.ccf .ccf-x:hover { background: #fbeaea; }

.ccf .ccf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.ccf .ccf-f { display: flex; flex-direction: column; gap: 7px; margin: 0; font-size: 15px; font-weight: 400; }
.ccf .ccf-f > span,
.ccf .ccf-f > label,
.ccf .ccf-dicom legend { font-size: 15px; font-weight: 400; color: var(--ccf-texto); padding: 0; }

.ccf .ccf-f input,
.ccf .ccf-f select {
	box-sizing: border-box; width: 100%; height: 50px; margin: 0;
	padding: 0 16px;
	border: 1px solid var(--ccf-borde); border-radius: 8px;
	background-color: #fff; color: var(--ccf-texto);
	font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.2;
	box-shadow: none; outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.ccf .ccf-f select {
	-webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2a44' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.ccf .ccf-f select:disabled { cursor: default; color: var(--ccf-ph); background-color: #fafbfc; }
.ccf .ccf-f input::placeholder { color: var(--ccf-ph); opacity: 1; }
.ccf .ccf-f input[readonly] { background: var(--ccf-gris); color: #6b7489; cursor: default; }
.ccf .ccf-f input:focus-visible,
.ccf .ccf-f select:focus-visible { border-color: var(--ccf-azul); box-shadow: 0 0 0 3px rgba(26, 63, 123, .15); }
.ccf .ccf-f [aria-invalid="true"] { border-color: var(--ccf-rojo); }
.ccf .ccf-f input:disabled { background: #fafbfc; color: var(--ccf-ph); cursor: default; }

/* Pie editable */
.ccf .ccf-pie input[name="pie"] { font-weight: 700; color: var(--ccf-azul); }
.ccf .ccf-pie input[name="pie"]:disabled { font-weight: 400; color: var(--ccf-ph); }
.ccf .ccf-f input[type="range"] {
	-webkit-appearance: none; appearance: none;
	width: 100%; height: 22px; margin: 2px 0 0; padding: 0;
	border: 0; border-radius: 0; box-shadow: none;
	background: transparent; cursor: pointer;
	--p: 0%;
}
.ccf .ccf-f input[type="range"]:disabled { cursor: default; opacity: .45; }
.ccf .ccf-f input[type="range"]::-webkit-slider-runnable-track {
	height: 6px; border-radius: 6px;
	background: linear-gradient(to right, var(--ccf-azul) var(--p), #dfe4ec var(--p));
}
.ccf .ccf-f input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: #dfe4ec; }
.ccf .ccf-f input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--ccf-azul); }
.ccf .ccf-f input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
	background: #fff; border: 2px solid var(--ccf-azul);
	box-shadow: 0 1px 4px rgba(16, 32, 64, .25);
}
.ccf .ccf-f input[type="range"]::-moz-range-thumb {
	box-sizing: border-box; width: 22px; height: 22px; border-radius: 50%;
	background: #fff; border: 2px solid var(--ccf-azul);
	box-shadow: 0 1px 4px rgba(16, 32, 64, .25);
}
.ccf .ccf-f input[type="range"]:focus-visible { outline: none; box-shadow: none; }
.ccf .ccf-f input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(26, 63, 123, .2); }
.ccf .ccf-f input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(26, 63, 123, .2); }
.ccf .ccf-hint { color: #6b7489; font-size: 13px; font-weight: 400; line-height: 1.4; }

.ccf .ccf-e { min-height: 0; color: var(--ccf-rojo); font-size: 13px; font-weight: 400; line-height: 1.3; }
.ccf .ccf-e:empty { display: none; }

.ccf .ccf-dicom { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
.ccf .ccf-dicom legend { margin-bottom: 7px; }
.ccf .ccf-radios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: calc(50% - 9px); }
.ccf .ccf-r {
	position: relative; display: flex; align-items: center;
	height: 50px; padding: 0 18px; margin: 0;
	border: 1px solid var(--ccf-borde); border-radius: 8px;
	background: #fff; cursor: pointer; user-select: none;
	transition: border-color .15s, background-color .15s;
}
.ccf .ccf-r input {
	position: absolute !important; opacity: 0 !important;
	width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important;
	pointer-events: none;
}
.ccf .ccf-r span {
	display: inline-flex; align-items: center; gap: 12px;
	font-size: 16px; font-weight: 400; color: var(--ccf-texto); line-height: 1;
}
.ccf .ccf-r span::before {
	content: ""; flex: none; box-sizing: border-box;
	width: 22px; height: 22px; border-radius: 50%;
	border: 2px solid #b8c0cd; background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.ccf .ccf-r:hover { border-color: #b8c0cd; }
.ccf .ccf-r:has(input:checked) { border-color: var(--ccf-azul); background: #f5f8fd; }
.ccf .ccf-r input:checked + span::before { border-color: var(--ccf-azul); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 11px var(--ccf-azul); }
.ccf .ccf-r input:focus-visible + span::before { outline: 3px solid rgba(26, 63, 123, .3); outline-offset: 2px; }

.ccf .ccf-hr { border: 0; border-top: 1px solid var(--ccf-gris); margin: 16px 0 20px; }

.ccf .ccf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ccf .ccf-msg { margin: 14px 0 0; color: var(--ccf-rojo); font-size: 14px; text-align: center; }
.ccf .ccf-msg:empty { display: none; }

.ccf .ccf-btn {
	display: flex; align-items: center; justify-content: center;
	width: auto; min-width: 240px; height: 52px; margin: 22px auto 0; padding: 0 40px;
	border: 0; border-radius: 8px;
	background: var(--ccf-rojo); color: #fff;
	font-size: 16px; font-weight: 700; line-height: 1; text-align: center; letter-spacing: 0;
	text-transform: none; box-shadow: none;
	cursor: pointer; transition: background-color .15s;
}
.ccf .ccf-btn:hover { background: #9f1414; }
.ccf .ccf-btn:focus-visible { outline: 3px solid rgba(186, 24, 24, .35); outline-offset: 2px; }
.ccf .ccf-btn:disabled { opacity: .7; cursor: progress; }
.ccf .ccf-ok .ccf-btn { margin-top: 26px; }

@media (max-width: 640px) {
	.ccf { width: 100%; max-height: 100dvh; height: 100dvh; max-width: none; border-radius: 0; }
	.ccf .ccf-form, .ccf .ccf-ok { padding: 56px 18px 24px; }
	.ccf .ccf-grid { grid-template-columns: 1fr; gap: 12px; }
	.ccf .ccf-radios { max-width: none; }
	.ccf .ccf-btn { width: 100%; min-width: 0; }
	.ccf .ccf-x { top: 8px; right: 8px; }
	.ccf .ccf-sub { font-size: 15px; margin-bottom: 20px; }
}

/* Solicitar auto: pie libre, sin deslizador */
.ccf[data-modo="solicitar"] .ccf-pie input[type="range"] { display: none; }
.ccf[data-modo="financiar"] .ccf-sol,
.ccf[data-modo="solicitar"] .ccf-stock { display: none; }
