/* CSS reutilizável da barra de comparação de preços (usada no backoffice e no frontoffice).
 * Este ficheiro substitui o bloco <style> inline gerado por render_price_comparison_bar().
 */

.comparar-wrapper {
    font-size: 12px;
    font-family: sans-serif;
    line-height: 1.4;
    max-width: 90%;
    margin-bottom: 70px;
}

.comparar-bar {
    position: relative;
    height: 14px;
    background: linear-gradient(to right, green, yellow, red);
    border-radius: 6px;
    overflow: visible;
}

.comparar-marker {
    position: absolute;
    top: -2px;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    z-index: 3;
}

.comparar-marker-line {
    width: 2px;
    height: 16px;
    background: black;
    margin-bottom: 2px;
}

.comparar-labels div {
    text-align: center;
}

.comparar-competitor-marker {
    position: absolute;
    top: 50%;
    transform: translateX(-50%);
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

.comparar-competitor-marker.lane-top {
    transform: translate(-50%, -120%);
}

.comparar-competitor-marker.lane-bottom {
    transform: translate(-50%, 22%);
}

.comparar-competitor-label {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 10px;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    position: relative;
}

.comparar-competitor-marker:hover {
    z-index: 10;
}

.comparar-competitor-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 1px;
    background: rgba(17, 24, 39, 0.45);
    transform: translateX(-50%);
}

.comparar-competitor-marker.lane-top::after {
    top: calc(100% - 2px);
    height: 14px;
}

.comparar-competitor-marker.lane-bottom::after {
    bottom: calc(100% - 2px);
    height: 14px;
}

.comparar-competitor-dot {
    width: 6px;
    height: 6px;
    background: #111827;
    border-radius: 50%;
    margin: 2px auto 0;
}

