/*
 * Estilos compartidos por los shortcodes de cotizaciones:
 * [cotizaciones_cereales], [promedio_cotizaciones_mes], [cotizaciones_fecha]
 *
 * Antes, cada shortcode imprimía su propio <style> inline en cada render,
 * duplicándose si el shortcode se usaba más de una vez en la misma página.
 * Ahora las reglas viven acá (un solo archivo, cacheable por el navegador) y
 * lo único dinámico (alto, tamaño de fuente, margen superior) se pasa por
 * variables CSS en el atributo style del contenedor.
 */

.cotiza-container {
    display: flex;
    flex-direction: column;
    margin-top: var(--cotiza-margin-top, 0px);
    font-family: "Roboto Condensed", sans-serif;
}

.cotiza-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.cotiza-header-precio-label {
    font-size: 0.75em;
    font-weight: normal;
    color: #555;
    padding: 0 1em;
}

.cotiza-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--cotiza-height, 33px);
    width: 100%;
    background-color: #fff;
    border-radius: 4px;
    margin: 2px 0;
    border: solid 1px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.cotiza-info {
    display: flex;
    align-items: center;
}

.cotiza-imagen {
    width: var(--cotiza-height, 33px);
    height: var(--cotiza-height, 33px);
    margin-right: 10px;
    background-color: #AAA;
    flex-shrink: 0;
}

.cotiza-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cotiza-nombre {
    font-size: var(--cotiza-font-size, 14px);
    font-weight: bold;
    margin-right: 10px;
    line-height: 1em;
}

.cotiza-precio {
    font-size: var(--cotiza-font-size, 14px);
    line-height: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.cotiza-monto {
    padding-right: 1em;
}

.cotiza-flecha {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5em;
}

.cotiza-flecha img {
    width: var(--cotiza-font-size, 14px);
    height: var(--cotiza-font-size, 14px);
    object-fit: contain;
    padding: 0;
    margin: 0;
}

.cotiza-botones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.cotiza-botones a {
    font-size: 12px;
    background-color: #666;
    color: #FFF;
    text-decoration: none;
    padding: 1px 10px 0px;
    margin: 0;
    font-weight: normal;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.cotiza-botones a:hover {
    background-color: #222;
}

.cotiza-nota-mes-anterior {
    font-size: 0.85em;
    color: #888;
}

#periodo {
    border: 0;
}

/* Buscador por fecha ([cotizaciones_fecha]) */
#cotizaciones-buscador {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

#resultado-cotizaciones {
    min-height: 1.5em;
}
