/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.logo-container {
    display: flex;
    align-items: normal;
    margin-bottom: 5px;
}

.logo {
    height: 50px;
    width: auto;
    margin-right: 10px;
    margin-left: 10px;
}

.company-info {
    display: flex;
    flex-direction: column;
}

.company-address {
    text-transform: uppercase;
    color: black;
    font-family: "arial", "serif";
    text-shadow: 0.1em 0.1em 0.2em #000;
    filter: dropshadow(color=gray, offx=0.1em, offy=0.1em);
    font-size: 0.8rem;
    margin: 5px;
}

.container {
    width: 90%;
    max-width: 600px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.container h1 {
    margin: 0px;
    font-size: 1.4rem;
    text-align: left;
    text-transform: uppercase;
    color: #7DA5E0;
    font-family: "arial", "serif";
    text-shadow: 3px 1px 2px #002b49;
}

#estadoPuja {
    color: #28a745;
}

.precio-actual {
    font-size: 3em;
    font-weight: bold;
    color: #28a745;
    text-align: center;
    border: 1px solid black;
    border-radius: 5px;
}

.info-puja,
.infoclientes {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
    font-size: 14px;
    border: 1px solid black;
    border-radius: 5px;			
}

.info-puja span#especie {
    display: grid;
    text-align: left;
    overflow-y: auto;
}
		
.linea-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 4px;
    border-radius: 5px;
}

.linea-info span {
    flex: 1;
    text-align: center;
}		

.linea-info.compacta {
    display: flex;
    flex-direction: row;           /* Asegura que sea horizontal */
    flex-wrap: nowrap;             /* Evita que salten a nueva línea */
    justify-content: space-around;
    background-color: #e8e8e8;
    padding: 4px 6px;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.linea-info.compacta span {
    flex: 1 1 0;                   /* Distribuye el espacio equitativamente */
    text-align: center;
    font-size: 14px;
    white-space: nowrap;           /* Evita que el texto se divida */
    overflow: hidden;              /* Oculta el texto que desborda */
    text-overflow: ellipsis;       /* Añade ... si el texto es muy largo */
    padding: 0 2px;
}


.lotesContainer {
    display: none;
    border: 1px solid black;
    border-radius: 5px;
}

.lotesContainer h3 {
    font-size: 1.2em;
    color: #333;
    margin: 5px 5px;
}

.lotesForm {
    margin-bottom: 2px;
}

.lotesList {
    margin-bottom: 2px;
}

.info-puja p,
.infoclientes p {
    margin: 5px 5px;
    font-size: 1.1em;
    color: #555;
}

.notificaciones {
    background-color: #f8f9fa;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid black;
}

.notificaciones h2 {
    font-size: 1.2em;
    color: #333;
    margin: 5px 5px;
}

.notificaciones p {
    margin: 5px 5px;
    font-size: 1em;
    color: #555;
}

/* 🆕 HISTÓRICO DE VENTAS */
.historico-ventas {
    max-height: 150px;
    overflow-y: auto;
    margin-top: 10px;
    border-top: 1px solid #ccc;
    padding-top: 5px;
}

.historico-ventas h4 {
    margin: 5px 0;
    font-size: 0.95em;
    color: #333;
}

#listaVentas {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-venta {
    padding: 4px;
    margin: 2px 0;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Colores según tipo (se asignan desde JS pero dejamos estilos base) */
.item-venta.prebia {
    background-color: #fff3e0;
    border-left: 3px solid #ff9800;
}

.item-venta.manual {
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.botones-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.boton-detener,
.boton-abandonar {
    flex: 1;
    margin: 5px;
    padding: 15px;
    font-size: 1.2em;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

.boton-detener {
    background-color: #dc3545;
    width: 50%;
}

.boton-abandonar {
    background-color: green;
    width: 40%;
}

.boton-detener:hover,
.boton-abandonar:hover {
    background-color: #c82333;
}

.boton-detener:disabled,
.boton-abandonar:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.boton-continuar,
.boton-cancelar {
    flex: 1;
    margin: 5px;
    padding: 15px;
    font-size: 1.2em;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

.boton-continuar {
    background-color: #dc3545;
    width: 50%;
}

.boton-cancelar {
    background-color: green;
    width: 40%;
}

.boton-continuar:hover,
.boton-cancelar:hover {
    background-color: #c82333;
}

.boton-continuar:disabled,
.boton-cancelar:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
		
/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .linea-info {
        flex-direction: column;
        gap: 5px;
    }
    .linea-info span {
        text-align: left;
    }
	
    .linea-info.compacta {
        padding: 4px 6px;
    }
    
    .linea-info.compacta span {
        font-size: 12px;
    }
    
    /* Ajustes para histórico en móvil */
    .historico-ventas {
        max-height: 120px;
    }
    
    .item-venta {
        font-size: 0.85em;
        padding: 3px;
    }
}