/* 
 * Tooltips para círculos de farol
 */

.farol-circle {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
    cursor: help;
    margin-right: 4px;
}

.farol-circle::after {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    content: attr(data-tooltip);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
}

.farol-circle:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 120%;
}

.farol-gray {
    background-color: #808080;
}

.farol-green {
    background-color: #4caf50;
}

.farol-yellow {
    background-color: #ffc107;
}

.farol-red {
    background-color: #ff0000;
}

/* Variantes para diferentes tamanhos */
.farol-circle-large {
    width: 32px;
    height: 32px;
}

.farol-circle-small {
    width: 18px;
    height: 18px;
}

/* Estilos para círculos na tabela */
.dash-table-container .farol-circle {
    width: 20px !important;
    height: 20px !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* Estilos para cards de farol com tooltip */
.card-farol-tooltip {
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: visible;
}

.card-farol-tooltip:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Ajuste específico para círculos de farol que já têm outra animação no hover */
.card-farol.card-farol-tooltip:hover {
    transform: scale(1.15); /* Mantém a animação original do card-farol */
}

/* Posicionamento específico para tooltips nos círculos de farol */
.card-farol.card-farol-tooltip::after {
    font-size: 12px;
    padding: 6px 10px;
    bottom: 120%; /* Posiciona um pouco mais acima para círculos menores */
}

.card-farol.card-farol-tooltip:hover::after {
    bottom: 130%; /* Ajusta a posição final do tooltip */
}

/* Tooltip para cards de status */
.card-farol-tooltip::after {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    content: attr(data-tooltip);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    width: max-content;
    font-weight: normal;
}

.card-farol-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 110%;
}

/* Suporte para tooltips na tabela - para elementos renderizados em HTML */
.dash-cell-value .farol-circle {
    position: relative;
    z-index: 10;
}

.dash-cell-value .farol-circle::after {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    content: attr(data-tooltip);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    width: max-content;
}

.dash-cell-value .farol-circle:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 120%;
}

/* Forçar posicionamento em células de tabela */
.dash-table-container td {
    position: relative !important;
    overflow: visible !important;
}
