/*-------------Impresion del medido de un pedido (MfeComercial)-------------*/
/* Basado en el patron de MfeDespacho (DispatchStyles.css, seccion #print-pedido-area). */

:root {
    --width-format-print-medido: 28rem;
    --border-table-color-medido: #4f4f4f;
    --header-medido-print-bg: #2980b9;
    --header-medido-print-text: #ffffff;
    --footer-medido-print-bg: #000000;
    --footer-medido-print-text: #ffffff;
}

#print-medido-area {
    width: var(--width-format-print-medido);
}

    #print-medido-area label {
        margin: 0;
    }

    #print-medido-area span {
        font-size: 1.2rem;
        flex: 1;
        margin-left: 0.8rem;
        font-weight: bold;
    }

/* Encabezado del medido */
#print-medido-area .header-medido-print label {
    width: 10rem;
    margin-bottom: 0.8rem;
}

#print-medido-area .header-medido-print > div,
#print-medido-area .footer-medido-print > div {
    display: flex;
}

    #print-medido-area .header-medido-print .titulo-medido {
        font-size: 1.4rem;
        font-weight: bold;
        color: var(--header-medido-print-bg);
        margin-bottom: 0.8rem;
        text-align: center;
        width: 100%;
        text-transform: uppercase;
        letter-spacing: 0.1rem;
        border-bottom: 2px solid var(--header-medido-print-bg);
        padding-bottom: 0.4rem;
    }

/* Tabla de detalle del medido */
#print-medido-area .table-detalle-medido-print {
    width: 100%;
    table-layout: fixed;
    margin-top: 0.8rem;
}

    #print-medido-area .table-detalle-medido-print th {
        font-size: smaller;
        background: black;
        color: white;
        border: 1px solid white;
        padding: 0.2rem;
    }

        #print-medido-area .table-detalle-medido-print th:last-child {
            width: 8rem;
        }

    #print-medido-area .table-detalle-medido-print tbody tr {
        border-bottom: 1px solid black;
        height: fit-content;
    }

    #print-medido-area .table-detalle-medido-print td {
        text-align: end;
        padding: 0 0.4rem;
        font-size: 14px;
        text-overflow: ellipsis;
        overflow: hidden;
        line-height: 1.3rem;
    }

        #print-medido-area .table-detalle-medido-print td > div {
            max-height: 4rem;
        }

        /* Nombre del producto alineado a la izquierda */
        #print-medido-area .table-detalle-medido-print td:nth-child(2) {
            text-align: start;
        }

/* Pie del medido (totales, costo domicilio, observaciones) */
#print-medido-area .footer-medido-print {
    display: flex;
    flex-direction: column;
    margin-top: 0.8rem;
    align-items: stretch;
    gap: 0.4rem;
}

    #print-medido-area .footer-medido-print .footer-total-medido,
    #print-medido-area .footer-medido-print .footer-domicilio-medido {
        align-items: center;
    }

        #print-medido-area .footer-medido-print .footer-total-medido label:first-child {
            margin: 0 0.8rem;
        }

        #print-medido-area .footer-medido-print .footer-total-medido span {
            background: black;
            color: white;
            padding: 0.8rem;
            text-align: end;
            font-size: medium;
        }

    #print-medido-area .footer-medido-print .observaciones-medido {
        border-top: 1px dashed var(--border-table-color-medido);
        padding-top: 0.4rem;
        margin-top: 0.4rem;
    }

        #print-medido-area .footer-medido-print .observaciones-medido span {
            font-weight: normal;
            font-style: italic;
        }

/* @media print: reglas especificas para impresion */
@media print {

    html {
        font-size: 62.5%;
    }

    body {
        font-family: 'Roboto', 'Open Sans', sans-serif;
        font-size: small;
        color: black;
        background-color: white;
    }

    #print-medido-area {
        width: var(--width-format-print-medido);
    }

        #print-medido-area label {
            margin: 0;
            font-size: small;
        }

        #print-medido-area .header-medido-print > div:first-child span {
            font-size: small;
            font-weight: bold;
        }

        #print-medido-area .table-detalle-medido-print th {
            font-size: x-small;
        }

        #print-medido-area .table-detalle-medido-print td {
            font-size: x-small;
        }

        #print-medido-area .footer-medido-print .footer-total-medido span {
            font-size: small;
        }
}
