/* Simulador de Precio Óptimo - misma estética que las otras tools */

/* Steps */
.sp-step { display: none; }
.sp-step.active {
    display: block;
    animation: spFadeIn 0.3s ease-out;
}

@keyframes spFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Progress bar */
.sp-progress-fill {
    background-color: var(--color-primary, #12715B);
    transition: width 0.4s ease;
}

.sp-helper {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    margin-top: 4px;
    margin-bottom: 0;
}

/* Moneda grid */
.sp-monedas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.sp-moneda {
    cursor: pointer;
    border: 2px solid transparent !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    text-align: left;
    background: #fff;
    line-height: 1.35;
}
.sp-moneda:hover {
    border-color: var(--color-primary, #12715B) !important;
}
.sp-moneda.sp-selected {
    border-color: var(--color-primary, #12715B) !important;
    background-color: rgba(18, 113, 91, 0.06);
}

/* Inputs numéricos */
.sp-input-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.sp-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
    min-width: 0;
}
.sp-input:focus {
    border-color: var(--color-primary, #12715B);
}
.sp-input-prefix,
.sp-input-suffix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: rgba(18, 113, 91, 0.08);
    border-radius: 10px;
    font-weight: 700;
    color: var(--color-primary, #12715B);
    font-size: 17px;
}

/* Slider de margen */
.sp-margen-display {
    text-align: center;
    margin: 8px 0;
}
.sp-margen-display #sp-margen-value {
    font-size: 56px;
    font-weight: 800;
    color: var(--color-primary, #12715B);
    line-height: 1;
}
.sp-margen-display .sp-margen-pct {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary, #12715B);
    opacity: 0.7;
}

.sp-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
}
.sp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary, #12715B);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(18, 113, 91, 0.3);
}
.sp-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary, #12715B);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(18, 113, 91, 0.3);
}

/* Navigation */
.sp-nav {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.sp-nav .sp-prev { flex: 0 0 auto; }
.sp-nav .sp-next { flex: 1; }

/* Results */
#sp-results { display: none; }

.sp-result-label {
    color: var(--color-primary, #12715B);
    letter-spacing: 3px;
    text-transform: uppercase;
}
.sp-precio-recomendado {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-primary, #12715B);
}

/* Diff badge */
.sp-diff-display {
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
}
.sp-diff-down {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}
.sp-diff-up {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}
.sp-diff-neutral {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.7);
}

/* Ocupación bar */
.sp-ocupacion-bar {
    height: 14px;
    border-radius: 7px;
    background: #e5e7eb;
    overflow: hidden;
}
.sp-ocupacion-fill {
    height: 100%;
    border-radius: 7px;
    background: var(--color-primary, #12715B);
    transition: width 0.6s ease;
}

.sp-ocu-limite  { color: #b91c1c; }
.sp-ocu-sano    { color: #15803d; }
.sp-ocu-holgura { color: #92400e; }
.sp-ocu-baja    { color: #9a3412; }

/* CTA Crossfy - card destacado, mensaje corto */
.sp-cta-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5eee9 100%);
    border: 2px solid #12715B;
    box-shadow: 0 8px 32px rgba(18, 113, 91, 0.12);
}
.sp-cta-title {
    color: #12715B;
    line-height: 1.3;
    font-weight: 800;
}
.sp-cta-body {
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.5;
}

/* WhatsApp button */
.sp-wa-btn {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: #fff !important;
    padding: 14px 24px;
    font-size: 17px;
}
.sp-wa-btn:hover {
    background-color: #1eb756 !important;
    border-color: #1eb756 !important;
}

/* Mobile */
@media (max-width: 640px) {
    .sp-monedas {
        grid-template-columns: 1fr 1fr;
    }
    .sp-input {
        font-size: 17px;
    }
    .sp-precio-recomendado {
        font-size: 44px;
    }
    .sp-margen-display #sp-margen-value {
        font-size: 44px;
    }
}
