/* ============================================
   Propyco Calculadora Notarial - Public Styles v1.1
   Alineado con simulador Propyco PDF
   ============================================ */

.propyco-calculadora-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Header */
.propyco-header {
    text-align: center;
    padding: 32px 24px 20px;
    border-bottom: 4px solid;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.propyco-logo {
    max-height: 60px;
    margin-bottom: 12px;
}

.propyco-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.propyco-brand-icon {
    font-size: 1.8rem;
}

.propyco-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.3;
}

.propyco-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* Formulario */
.propyco-form {
    padding: 28px 24px;
}

.propyco-form-group {
    margin-bottom: 18px;
}

.propyco-form-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.propyco-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.propyco-input-group {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.propyco-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.propyco-input-prefix {
    padding: 12px 14px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    border-right: 2px solid #e2e8f0;
}

.propyco-input-group input,
.propyco-form-group input[type="text"],
.propyco-form-group input[type="email"],
.propyco-form-group input[type="tel"],
.propyco-form-group select {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 1rem;
    color: #1e293b;
    background: transparent;
    outline: none;
    width: 100%;
}

.propyco-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.propyco-help {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Checkbox custom */
.propyco-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 500 !important;
    line-height: 1.4;
}

.propyco-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0f4c75;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Botón calcular */
.propyco-btn-calcular {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.propyco-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.propyco-btn-calcular:active {
    transform: translateY(0);
}

/* Modal Lead */
.propyco-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.propyco-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    animation: propycoSlideUp 0.3s ease;
}

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

.propyco-modal-header {
    padding: 24px;
    color: #fff;
    text-align: center;
}

.propyco-modal-header h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.propyco-modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.propyco-modal-form {
    padding: 24px;
}

.propyco-privacy {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 12px 0 0;
}

/* ============================================
   RESULTADOS - Estructura tipo tabla PDF
   ============================================ */

.propyco-resultados {
    padding: 24px;
    animation: propycoFadeIn 0.5s ease;
}

@keyframes propycoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.propyco-resultados-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.propyco-resultados-header h3 {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: 1.2rem;
}

.propyco-valor-inmueble {
    color: #64748b;
    font-size: 0.95rem;
}

.propyco-valor-inmueble strong {
    color: #1e293b;
    font-size: 1.1rem;
}

/* Título de sección */
.propyco-seccion-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0f4c75;
}

.propyco-seccion-titulo.secundario {
    border-bottom-color: #3282b8;
}

.propyco-seccion-titulo span {
    font-size: 1.2rem;
}

/* Tabla de resultados */
.propyco-tabla-resultados {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.88rem;
}

.propyco-tabla-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
    color: #475569;
    text-align: right;
}

.propyco-tabla-header .col-concepto {
    text-align: left;
}

.propyco-tabla-fila {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.propyco-tabla-fila:last-child {
    border-bottom: none;
}

.propyco-tabla-fila:nth-child(even) {
    background: #fafafa;
}

.propyco-tabla-fila .col-concepto {
    text-align: left;
    color: #334155;
    line-height: 1.4;
}

.propyco-tabla-fila .col-vendedor,
.propyco-tabla-fila .col-comprador,
.propyco-tabla-fila .col-total {
    text-align: right;
    color: #1e293b;
    font-weight: 500;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
}

.propyco-tabla-fila.highlight .col-vendedor {
    color: #dc2626;
    font-weight: 700;
}

.propyco-tabla-fila.total {
    background: #f1f5f9 !important;
    border-top: 2px solid #cbd5e1;
    font-weight: 700;
}

.propyco-tabla-fila.total .col-vendedor,
.propyco-tabla-fila.total .col-comprador,
.propyco-tabla-fila.total .col-total {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Gran Total */
.propyco-gran-total {
    margin-top: 20px;
    border: 2px solid #0f4c75;
    border-radius: 10px;
    overflow: hidden;
}

.propyco-gran-total-header {
    background: #0f4c75;
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 1px;
}

.propyco-tabla-fila.gran-total {
    background: #eff6ff !important;
}

.propyco-tabla-fila.gran-total .col-vendedor,
.propyco-tabla-fila.gran-total .col-comprador,
.propyco-tabla-fila.gran-total .col-total {
    font-weight: 700;
    font-size: 1rem;
    color: #0f4c75;
}

/* Legal */
.propyco-legal {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 8px;
    margin: 20px 0;
}

.propyco-legal p {
    margin: 0;
    color: #92400e;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* WhatsApp */
.propyco-whatsapp {
    text-align: center;
    margin: 16px 0;
}

.propyco-whatsapp a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.propyco-whatsapp a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,211,102,0.3);
}

/* Acciones */
.propyco-actions {
    text-align: center;
    margin-top: 20px;
}

.propyco-btn-recalcular {
    padding: 12px 28px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.propyco-btn-recalcular:hover {
    border-color: #94a3b8;
    color: #334155;
}

/* Footer */
.propyco-footer {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.propyco-footer p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Error / Success */
.propyco-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    border-left: 4px solid #ef4444;
}

.propyco-success {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    border-left: 4px solid #10b981;
}

/* Responsive */
@media (max-width: 640px) {
    .propyco-form-row {
        grid-template-columns: 1fr;
    }

    .propyco-tabla-header,
    .propyco-tabla-fila {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 4px;
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    .propyco-tabla-fila .col-vendedor,
    .propyco-tabla-fila .col-comprador,
    .propyco-tabla-fila .col-total {
        font-size: 0.75rem;
    }

    .propyco-title {
        font-size: 1.15rem;
    }

    .propyco-resultados {
        padding: 16px 12px;
    }
}
