﻿/* ============================================================
   ZENTHIA Proyectos – Widget Frontend Styles
   Colores base:
     --cpr-orange : #C95B25   (acento naranja/óxido)
     --cpr-navy   : #1e2d4f   (azul marino oscuro)
     --cpr-bg     : #f7f4f0   (crema cálido)
     --cpr-border : #e4ddd5   (borde suave)
     --cpr-text   : #2c2c2c
     --cpr-muted  : #888
     --cpr-green  : #27a060   (valores óptimos)
   ============================================================ */

/* ── Variables ───────────────────────────────────────────────── */
.cpr-wrap {
    --cpr-orange : #C95B25;
    --cpr-navy   : #1e2d4f;
    --cpr-bg     : #f7f4f0;
    --cpr-border : #e4ddd5;
    --cpr-text   : #2c2c2c;
    --cpr-muted  : #888;
    --cpr-green  : #27a060;
    --cpr-white  : #ffffff;
    --cpr-radius : 8px;
    --cpr-shadow : 0 1px 4px rgba(0,0,0,.08);

    background-color: var(--cpr-bg);
    border-radius: var(--cpr-radius);
    padding: 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--cpr-text);
    font-size: 14px;
    line-height: 1.55;
}

/* ── Grid de dos columnas ────────────────────────────────────── */
.cpr-grid {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 860px) {
    .cpr-grid { grid-template-columns: 1fr; }
}

/* ── Título y código ──────────────────────────────────────────  */
.cpr-header { margin-bottom: 14px; }

.cpr-titulo {
    font-size: 22px;
    font-weight: 800;
    color: var(--cpr-text);
    margin: 0 0 4px;
    line-height: 1.25;
}

.cpr-codigo {
    font-size: 12px;
    color: var(--cpr-muted);
    margin: 0 0 12px;
}

.cpr-codigo span { font-weight: 600; }

/* ── Descripción ─────────────────────────────────────────────── */
.cpr-descripcion {
    font-size: 13px;
    color: #444;
    line-height: 1.65;
    margin-bottom: 16px;
}

.cpr-descripcion p { margin: 0; }

/* ── Lista de características ────────────────────────────────── */
.cpr-caract-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.cpr-caract-list li {
    font-size: 13px;
    color: #444;
    padding: 3px 0 3px 14px;
    position: relative;
    border-bottom: 1px dashed #ece7e1;
}

.cpr-caract-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--cpr-orange);
    font-weight: 700;
}

/* ── Botón CTA ───────────────────────────────────────────────── */
.cpr-btn-contactar {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background-color: var(--cpr-orange);
    color: var(--cpr-white);
    text-align: center;
    text-decoration: none;
    border-radius: var(--cpr-radius);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 28px;
    transition: opacity .2s, transform .15s;
}

.cpr-btn-contactar:hover {
    opacity: .9;
    transform: translateY(-1px);
    color: var(--cpr-white);
}

/* ── Secciones genéricas ─────────────────────────────────────── */
.cpr-section {
    border-top: 1px solid var(--cpr-border);
    padding-top: 20px;
    margin-bottom: 24px;
}

.cpr-section-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--cpr-muted);
    margin: 0 0 14px;
}

/* ── Estructura de Inversión ─────────────────────────────────── */
.cpr-inv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.cpr-inv-tile {
    background: var(--cpr-white);
    border-radius: var(--cpr-radius);
    padding: 12px 14px;
    box-shadow: var(--cpr-shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cpr-inv-label {
    font-size: 11.5px;
    color: var(--cpr-muted);
}

.cpr-inv-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--cpr-text);
}

/* Tile de Total – fondo naranja */
.cpr-inv-total {
    background-color: var(--cpr-orange);
}

.cpr-inv-total .cpr-inv-label { color: rgba(255,255,255,.8); }
.cpr-inv-total .cpr-inv-value { color: var(--cpr-white); }

/* Fila ticket mínimo */
.cpr-ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--cpr-border);
    font-size: 13px;
}

.cpr-ticket-row .cpr-orange {
    font-weight: 700;
    font-size: 15px;
}

/* ── Documentación ───────────────────────────────────────────── */
.cpr-docs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cpr-doc-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px 12px;
    margin-bottom: 6px;
    background: var(--cpr-white);
    border-radius: 6px;
    box-shadow: var(--cpr-shadow);
    font-size: 13px;
}

.cpr-doc-link {
    text-decoration: none;
    color: var(--cpr-text);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.cpr-doc-link:hover { color: var(--cpr-orange); }

.cpr-doc-icon { font-size: 15px; flex-shrink: 0; }

.cpr-doc-locked {
    opacity: .5;
    cursor: not-allowed;
}

.cpr-doc-nota {
    display: block;
    width: 100%;
    color: var(--cpr-muted);
    font-size: 11px;
    margin-top: 2px;
}

/* ── Imagen del activo ───────────────────────────────────────── */
.cpr-imagen-wrap {
    position: relative;
    border-radius: var(--cpr-radius);
    overflow: hidden;
    margin-bottom: 0;
    background: var(--cpr-navy);
}

.cpr-imagen {
    display: block;
    width: 100%;
    height: 240px !important;
    max-height: 240px !important;
    object-fit: cover;
    object-position: center;
}

.cpr-imagen-placeholder {
    height: 240px !important;
    max-height: 240px !important;
    background: var(--cpr-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.35);
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.cpr-imagen-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10,18,40,.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    font-size: 11px;
    color: rgba(255,255,255,.7);
}

/* ── Barra de Captación ──────────────────────────────────────── */
.cpr-captacion {
    padding: 14px 0 4px;
    border-bottom: 1px solid var(--cpr-border);
    margin-bottom: 0;
}

.cpr-cap-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
}

.cpr-cap-ZENTHIA-label {
    color: var(--cpr-orange);
    font-size: 14px;
}

.cpr-cap-objetivo { color: var(--cpr-text); }

.cpr-progress-bar {
    width: 100%;
    height: 5px;
    background: #ddd;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cpr-progress-fill {
    height: 100%;
    background: var(--cpr-orange);
    border-radius: 99px;
    transition: width .6s ease;
}

.cpr-cap-sub {
    font-size: 11.5px;
    color: var(--cpr-muted);
    margin: 0 0 8px;
}

/* ── Rentabilidad ────────────────────────────────────────────── */
.cpr-rent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    background: var(--cpr-white);
    box-shadow: var(--cpr-shadow);
}

.cpr-rent-base-row {
    border: 1.5px solid var(--cpr-orange);
}

.cpr-rent-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cpr-rent-escenario {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpr-rent-salida {
    font-size: 11px;
    color: var(--cpr-muted);
}

.cpr-rent-pct {
    font-size: 20px;
    font-weight: 800;
    color: var(--cpr-text);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.cpr-badge-objetivo {
    display: inline-block;
    background: var(--cpr-orange);
    color: var(--cpr-white);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 99px;
    vertical-align: middle;
    text-transform: lowercase;
}

/* ── Cálculo escenario base ──────────────────────────────────── */
.cpr-calc-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    font-size: 13px;
    margin-bottom: 10px;
}

.cpr-calc-val {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.cpr-calc-neto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1.5px solid var(--cpr-orange);
    padding-top: 8px;
    margin-top: 4px;
}

.cpr-neto-label { font-size: 14px; font-weight: 700; color: var(--cpr-orange); }
.cpr-neto-value { font-size: 18px; font-weight: 800; color: var(--cpr-orange); }

.cpr-nota-fiscal {
    font-size: 10.5px;
    color: var(--cpr-muted);
    font-style: italic;
    margin: 8px 0 0;
}

/* ── Indicadores Clave ───────────────────────────────────────── */
.cpr-ind-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cpr-ind-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cpr-ind-label {
    font-size: 10.5px;
    color: var(--cpr-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.cpr-ind-val {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Dot de nivel de riesgo */
.cpr-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cpr-dot-bajo   { background: #27a060; }
.cpr-dot-medio  { background: #f0b429; }
.cpr-dot-alto   { background: #e03e3e; }

/* Check de control */
.cpr-check-icon { font-size: 13px; }
.cpr-check-green { color: #27a060; }

/* ── Participación ───────────────────────────────────────────── */
.cpr-part-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: var(--cpr-radius);
    background: var(--cpr-white);
    box-shadow: var(--cpr-shadow);
    gap: 12px;
}

.cpr-part-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cpr-part-info strong { font-size: 14px; }
.cpr-part-info small  { font-size: 11px; color: var(--cpr-muted); }

.cpr-part-nums {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    white-space: nowrap;
}

.cpr-part-nums strong { font-size: 15px; }

.cpr-part-pct {
    font-size: 12px;
    color: var(--cpr-muted);
}

.cpr-part-fee-row {
    border: 1.5px solid var(--cpr-border);
}

.cpr-fee-pct {
    font-size: 24px;
    font-weight: 800;
    color: var(--cpr-orange);
}

/* ── Utilidades de color ─────────────────────────────────────── */
.cpr-orange { color: var(--cpr-orange); }
.cpr-green  { color: var(--cpr-green); }
.cpr-muted  { color: var(--cpr-muted); }
