/* ==========================================================================
   LlamaCita — escenas animadas y calculadora (portado de la landing de
   apinetsolutions.com/llamacita). Se carga después de base.css.
   ========================================================================== */

:root { --lc-noche: var(--lc-tinta); }

/* Escena de la llamada */
.lc-demo-marco { position: relative; width: 100%; max-width: 400px; margin: 0 auto; }
@media (min-width: 980px) { .lc-demo-marco { justify-self: end; margin: 0; } }

.lc-ondas { position: absolute; top: 44px; left: 42px; pointer-events: none; }
.lc-ondas span {
    position: absolute;
    width: 460px;
    height: 460px;
    margin: -230px 0 0 -230px;
    border: 1px solid rgba(88, 227, 201, .34);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.18);
    animation: lc-onda 4.8s ease-out infinite;
}
.lc-ondas span:nth-child(2) { animation-delay: 1.6s; }
.lc-ondas span:nth-child(3) { animation-delay: 3.2s; }
@keyframes lc-onda {
    0% { opacity: 0; transform: scale(.18); }
    14% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.5); }
}

.lc-demo {
    position: relative;
    padding: 16px;
    border-radius: 26px;
    background: #fff;
    color: var(--lc-tinta);
    box-shadow: 0 34px 70px rgba(0, 0, 0, .42);
}
.lc-demo__llamada {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--lc-suave);
}
.lc-demo__icono {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--lc-noche);
    color: var(--lc-menta);
}
.lc-demo__estado { flex: 1; min-width: 0; }
.lc-demo__estado small { display: block; font-size: .74rem; color: var(--lc-gris); }
.lc-demo__cambio { display: grid; }
.lc-demo__cambio b { grid-area: 1 / 1; font-size: .94rem; font-weight: 700; color: var(--lc-tinta); }
.lc-demo__cambio .lc-demo__atendida { color: #007F77; }
.lc-demo__tonos { display: flex; flex: none; gap: 4px; }
.lc-demo__tonos i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }

.lc-demo__charla { display: grid; gap: 10px; padding: 18px 4px 16px; }
.lc-demo__turno { display: grid; justify-items: end; }
.lc-demo__turno > * { grid-area: 1 / 1; }
.lc-burbuja {
    justify-self: start;
    max-width: 86%;
    margin: 0;
    padding: 10px 14px;
    border-radius: 16px 16px 16px 5px;
    background: #eef1f5;
    font-size: .94rem;
    line-height: 1.35;
    color: var(--lc-tinta);
}
.lc-burbuja--ia {
    justify-self: end;
    border-radius: 16px 16px 5px 16px;
    background: var(--lc-noche);
    color: #fff;
}
.lc-burbuja--escribiendo { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
.lc-burbuja--escribiendo span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lc-menta);
    animation: lc-escribe 1s ease-in-out infinite;
}
.lc-burbuja--escribiendo span:nth-child(2) { animation-delay: .15s; }
.lc-burbuja--escribiendo span:nth-child(3) { animation-delay: .3s; }
@keyframes lc-escribe { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

.lc-demo__cita {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #CDF6EF;
}
.lc-demo__cita strong { display: block; font-size: .94rem; color: #00544F; }
.lc-demo__cita small { display: block; font-size: .8rem; color: #006861; }
.lc-demo__ok {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #007F77;
    color: #fff;
    font-size: .85rem;
}
.lc-demo__nota { position: relative; margin: 12px 0 0; text-align: center; font-size: .78rem; color: rgba(255, 255, 255, .55); }

/* Con la animación en marcha: sin JavaScript o con movimiento reducido se ve la escena final. */
.lc-demo:not(.is-animada) .lc-burbuja--escribiendo,
.lc-demo:not(.is-animada) .lc-demo__cambio b:not(.lc-demo__atendida) { display: none; }
.lc-demo:not(.is-animada) .lc-demo__tonos i { background: #007F77; }
.lc-demo.is-lista .lc-burbuja[data-desde],
.lc-demo.is-lista .lc-demo__cita[data-desde],
.lc-demo.is-lista .lc-demo__cambio [data-desde] { transition: opacity .35s ease, transform .35s ease; }
.lc-demo.is-animada .lc-burbuja[data-desde],
.lc-demo.is-animada .lc-demo__cita[data-desde],
.lc-demo.is-animada .lc-demo__cambio [data-desde] { opacity: 0; transform: translateY(8px); }
.lc-demo.is-animada .lc-burbuja.is-on,
.lc-demo.is-animada .lc-demo__cita.is-on,
.lc-demo.is-animada .lc-demo__cambio .is-on { opacity: 1; transform: none; }
.lc-demo.is-animada .lc-demo__tonos i.is-on { background: #ef4444; }
.lc-demo.is-animada.is-atendida .lc-demo__tonos i { background: #007F77; }
.lc-demo.is-animada.is-atendida .lc-demo__icono { background: #007F77; color: #fff; }

@media (max-width: 420px) {
    .lc-demo__cambio b { font-size: .86rem; }
}
@media (max-width: 979px) {
    .lc-ondas { left: 50%; top: 50%; }
    }
@media (prefers-reduced-motion: reduce) {
    .lc-ondas span, .lc-burbuja--escribiendo span { animation: none; }
    .lc-ondas span { opacity: .5; transform: scale(.8); }
}


/* Notas bajo los planes */
.lc-notas {
    display: grid;
    gap: 10px;
    max-width: 820px;
    margin: 36px auto 0;
    padding: 20px 22px;
    border-radius: var(--lc-radio);
    background: var(--lc-suave);
    font-size: .92rem;
    color: var(--lc-gris-oscuro);
}
.lc-notas strong { color: var(--lc-tinta); }


/* ---------- Calculadora: lo que se escapa cada mes ---------- */
.lc-roi {
    position: relative;
    overflow: hidden;
    padding: clamp(64px, 8vw, 108px) 0;
    color: #fff;
    background:
        radial-gradient(720px 520px at 12% 12%, rgba(1, 151, 142, .34), transparent 70%),
        radial-gradient(680px 520px at 92% 88%, rgba(88, 227, 201, .12), transparent 70%),
        var(--lc-noche);
}
.lc-roi__cabecera { max-width: 780px; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.lc-roi__etiqueta { margin: 0 0 12px; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lc-menta); }
.lc-roi__cabecera h2 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: #fff;
    text-wrap: balance;
}
.lc-roi__cabecera p:last-child { margin: 0; font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgba(255, 255, 255, .75); }

.lc-roi__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
}
@media (min-width: 980px) {
    .lc-roi__panel { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 32px; }
    .lc-roi__resultado { position: sticky; top: calc(var(--lc-cabecera-alto) + 18px); }
}

/* Mandos */
.lc-roi__mandos {
    min-width: 0;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 26px;
    background: rgba(255, 255, 255, .05);
}
.lc-canal {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
}
.lc-canal label { position: relative; cursor: pointer; }
.lc-canal input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lc-canal span {
    display: block;
    padding: 10px 6px;
    border-radius: 11px;
    text-align: center;
    font-size: .95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .78);
    transition: background-color .2s ease, color .2s ease;
}
.lc-canal input:checked + span { background: var(--lc-menta); color: var(--lc-noche); font-weight: 800; }
.lc-canal input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.lc-mando {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 2px 14px;
    margin-top: 24px;
}
.lc-mando[hidden] { display: none; }
.lc-mando label { font-size: .98rem; color: rgba(255, 255, 255, .86); }
.lc-mando output { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--lc-menta); white-space: nowrap; }
.lc-mando input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
    height: 34px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.lc-mando input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 99px;
    background: linear-gradient(to right, var(--lc-menta) var(--relleno, 50%), rgba(255, 255, 255, .17) var(--relleno, 50%));
}
.lc-mando input[type="range"]::-webkit-slider-thumb {
    width: 26px;
    height: 26px;
    margin-top: -9px;
    border: 6px solid var(--lc-menta);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .45);
    -webkit-appearance: none;
    appearance: none;
}
.lc-mando input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .17); }
.lc-mando input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--lc-menta); }
.lc-mando input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 6px solid var(--lc-menta);
    border-radius: 50%;
    background: #fff;
}
.lc-mando input[type="range"]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }

.lc-roi__afinar { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .13); }
.lc-roi__afinar summary { font-size: .95rem; font-weight: 600; color: rgba(255, 255, 255, .8); cursor: pointer; }
.lc-roi__afinar summary:hover { color: #fff; }

/* Resultado */
.lc-roi__resultado {
    min-width: 0;
    padding: clamp(22px, 3vw, 34px);
    border-radius: 26px;
    background: #fff;
    color: var(--lc-tinta);
    box-shadow: 0 34px 70px rgba(0, 0, 0, .42);
}
.lc-roi__antetitulo { margin: 0; font-size: .98rem; font-weight: 600; color: var(--lc-gris-oscuro); }
.lc-roi__cifra {
    margin: 2px 0 4px;
    font-size: clamp(3.2rem, 7vw, 4.7rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: #007F77;
}
.lc-roi__citas { min-height: 1.5em; margin: 0 0 22px; font-size: .95rem; color: var(--lc-gris); }

.lc-barras { display: grid; gap: 14px; margin-bottom: 22px; }
.lc-barra { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-size: .92rem; }
.lc-barra span { color: var(--lc-gris-oscuro); }
.lc-barra b { font-weight: 700; white-space: nowrap; }
.lc-barra i { grid-column: 1 / -1; display: block; height: 10px; border-radius: 99px; background: #eef1f5; overflow: hidden; }
.lc-barra em { display: block; width: 0; height: 100%; min-width: 4px; border-radius: 99px; background: #22C4AE; transition: width .25s ease; }
.lc-barra--coste em { background: var(--lc-noche); }

.lc-roi__plan { display: grid; gap: 1px; padding: 14px 16px; border-radius: 16px; background: var(--lc-suave); }
.lc-roi__plan small { font-size: .8rem; color: var(--lc-gris); }
.lc-roi__plan strong { font-size: 1.12rem; font-weight: 800; color: var(--lc-tinta); }
.lc-roi__plan span { font-size: .88rem; color: var(--lc-gris-oscuro); }

.lc-roi__neto { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 20px 0 0; font-weight: 700; color: var(--lc-tinta); }
.lc-roi__neto strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: #007F77; white-space: nowrap; }
.lc-roi__neto strong.es-negativo { color: #c62828; }
.lc-roi__pago { min-height: 1.5em; margin: 0 0 18px; font-size: .9rem; color: var(--lc-gris-oscuro); }
.lc-roi__resultado .lc-roi__boton { background: var(--lc-noche); color: #fff; font-weight: 700; border: 0; }
.lc-roi__resultado .lc-roi__boton:hover { background: #007F77; color: #fff; }
.lc-roi__aviso { margin: 12px 0 0; text-align: center; font-size: .78rem; line-height: 1.45; color: var(--lc-gris); }

@media (max-width: 420px) {
    .lc-canal span { font-size: .88rem; padding: 10px 2px; }
}
