/* Estilos globales   */


/* Estilos globales   */

/* ¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~ */
/* ¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~ */
/* ¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~ */

/* body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    font-size: 16px;
} */

.fx_f_crm_invoiceContainer {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */
    padding: 30px;
    box-sizing: border-box;
    transform-origin: top center;
}

.fx_f_crm_invoiceHeader {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.fx_f_crm_companyInfo {
    flex: 1;
}

.fx_f_crm_companyLogo {
    max-width: 200px;
    height: auto;
}

.fx_f_crm_companyName {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.fx_f_crm_invoiceDetails {
    flex: 1;
    text-align: right;
}

.fx_f_crm_invoiceTitle {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
}

.fx_f_crm_invoiceNumber {
    font-size: 16px;
    margin-bottom: 5px;
}

.fx_f_crm_invoiceDate {
    font-size: 16px;
    margin-bottom: 5px;
}

.fx_f_crm_clientInfo {
    margin-bottom: 30px;
}

.fx_f_crm_clientTitle {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.fx_f_crm_clientName {
    font-weight: bold;
    margin-bottom: 5px;
}

.fx_f_crm_invoiceTable {
    box-shadow: none;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.fx_f_crm_invoiceTable th {
    background-color: #404142;
    color: white;
    padding: 12px;
    text-align: left;
}

.fx_f_crm_invoiceTable td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.fx_f_crm_invoiceTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

.fx_f_crm_tableItemDesc {
    width: 50%;
}

.fx_f_crm_tableItemQty {
    width: 10%;
    text-align: center;
}

.fx_f_crm_tableItemPrice {
    width: 20%;
    text-align: right;
}

.fx_f_crm_tableItemTotal {
    width: 20%;
    text-align: right;
}

.fx_f_crm_invoiceSummary {
    margin-left: auto;
    width: 300px;
    min-width: 300px;
}

.fx_f_crm_summaryRow {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.fx_f_crm_summaryLabel {
    font-weight: bold;
}

.fx_f_crm_summaryValue {
    text-align: right;
}

.fx_f_crm_summaryTotal {
    font-size: 18px;
    font-weight: bold;
    border-top: 2px solid #2c3e50;
    padding-top: 5px;
    margin-top: 5px;
}

.fx_f_crm_invoiceFooter {
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
    color: #777;
}

.fx_f_crm_paymentInfo {
    margin-top: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.fx_f_crm_paymentTitle {
    font-weight: bold;
    margin-bottom: 10px;
}

.fx_f_crm_popUpBtnsInvoice {
    display: flex;
    gap: 10px;
    margin: 10px 0px;
}

.invoice-result {
    margin: 20px 0px;
}

.invoice-result div strong {
    display: inline-block;
    margin: 2px 0px;
}


/* Estilos para dispositivos móviles manteniendo proporciones */
@media (max-width: 800px) {
    html {
        /* Hack para asegurar que todo el viewport se use */
        height: 100%;
        width: 100%;
        overflow-x: hidden;
    }
    
    body {
        /* Eliminar padding en móvil para maximizar espacio */
        padding: 0;
        min-height: 100%;
        width: 100%;
    }
    
    .fx_f_crm_invoiceContainer {
        padding: 15px;
        /* Remover cualquier margen */
        margin: 0 auto;
        transform: scale(0.98);
        transform-origin: top center;
        width: 100%;
        max-width: 100%;
        /* Asegurarse que no haya scroll horizontal */
        overflow-x: hidden;
    }
    
    /* Mantener las proporciones reduciendo el tamaño de fuente proporcionalmente */
    body {
        font-size: 14px;
    }
    
    .fx_f_crm_companyName {
        font-size: 20px;
    }
    
    .fx_f_crm_invoiceTitle {
        font-size: 22px;
    }
    
    .fx_f_crm_clientTitle {
        font-size: 16px;
    }
    
    .fx_f_crm_invoiceTable th,
    .fx_f_crm_invoiceTable td {
        padding: 8px;
    }
    
    .fx_f_crm_summaryTotal {
        font-size: 16px;
    }
    
    .fx_f_crm_invoiceFooter {
        font-size: 12px;
    }
    
    /* Asegurarse que la tabla se mantenga a escala */
    .fx_f_crm_invoiceTable {
        font-size: 14px;
    }
    
    /* Ajustar el resumen para móvil */
    .fx_f_crm_invoiceSummary {
        width: 100%;
        max-width: 180px;
    }
}

/* Para dispositivos muy pequeños, escalar aún más */
@media (max-width: 400px) {
    body {
        font-size: 12px;
    }
    
    .fx_f_crm_invoiceContainer {
        padding: 10px;
        transform: scale(0.95);
    }
    
    .fx_f_crm_companyName {
        font-size: 18px;
    }
    
    .fx_f_crm_invoiceTitle {
        font-size: 20px;
    }
    
    .fx_f_crm_invoiceTable th,
    .fx_f_crm_invoiceTable td {
        padding: 6px;
    }
}




@media screen and (max-width: 768px) {

    #preview_invoice_popup {
        font-size: 0.8em;
    }

    .fx_f_crm_invoiceTitle,
    .fx_f_crm_invoiceNumber,
    .fx_f_crm_clientTitle,
    .fx_f_crm_clientInfo,
    .fx_f_crm_invoiceDate,
    .fx_f_crm_summaryRow.fx_f_crm_summaryTotal,
    .fx_f_crm_companyName.editable-field,
    .fx_f_crm_invoiceTable,
    .invoice-item input {
        font-size: 0.85em;
    }
}
