/* ==========================================================================
   Linha do tempo (shortcode [linha_do_tempo])
   ========================================================================== */

.linha-do-tempo {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    font-family: inherit;
    color: #1f2937;
}

.linha-do-tempo svg {
    display: block;
    width: 100%;
    height: auto;
}

.linha-do-tempo .ldt-bar {
    cursor: pointer;
}

.linha-do-tempo .ldt-axis text {
    font-size: 11px;
    fill: #6b7280;
}

.linha-do-tempo .ldt-axis line {
    stroke: #d1d5db;
    stroke-width: 1;
}

.linha-do-tempo .ldt-grid line {
    stroke: #e5e7eb;
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.linha-do-tempo .ldt-axis-label {
    font-size: 10px;
    fill: #9ca3af;
}

/* Tooltip ----------------------------------------------------------------- */
.linha-do-tempo .ldt-tooltip {
    position: absolute;
    z-index: 30;
    display: none;
    max-width: 320px;
    padding: 0.9rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
    line-height: 1.45;
    pointer-events: none;
}

.linha-do-tempo .ldt-tooltip.is-visible {
    display: block;
}

.linha-do-tempo .ldt-tooltip-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.linha-do-tempo .ldt-tooltip p {
    margin: 0 0 0.5rem;
}

.linha-do-tempo .ldt-tooltip .ldt-tooltip-kv {
    margin: 0.15rem 0;
}

.linha-do-tempo .ldt-tooltip .ldt-tooltip-kv strong {
    color: #374151;
}

.linha-do-tempo .ldt-tooltip .ldt-tooltip-tags {
    margin-top: 0.4rem;
}

.linha-do-tempo .ldt-tooltip .ldt-tag {
    display: inline-block;
    padding: 1px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
}

.linha-do-tempo .ldt-tooltip a.ldt-button {
    pointer-events: auto;
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.linha-do-tempo .ldt-tooltip a.ldt-button:hover {
    background: #1e40af;
}

/* Legend ------------------------------------------------------------------ */
.linha-do-tempo .ldt-legend-label {
    margin-top: 1rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.linha-do-tempo .ldt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}

.linha-do-tempo .ldt-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #374151;
}

.linha-do-tempo .ldt-legend .ldt-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.linha-do-tempo .ldt-empty {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}
/* ==========================================================================
   Linha do tempo VERTICAL (shortcode [linha_do_tempo_vertical])
   ========================================================================== */

.linha-do-tempo-vertical {
    max-width: 960px;
    margin: 2rem auto;
    font-family: inherit;
    color: #1f2937;
}

.linha-do-tempo-vertical .vlt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.linha-do-tempo-vertical .vlt-filter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 240px;
}

.linha-do-tempo-vertical .vlt-filter label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.linha-do-tempo-vertical .vlt-filter select {
    font-size: 0.9rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2937;
}

.linha-do-tempo-vertical .vlt-count {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1rem 0.5rem;
}

.linha-do-tempo-vertical .vlt-timeline {
    position: relative;
    padding: 0.5rem 0 1rem;
}

.linha-do-tempo-vertical .vlt-row {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 64px;
}

/* Eixo central (linha contínua) */
.linha-do-tempo-vertical .vlt-axis {
    position: relative;
    height: 100%;
    min-height: 64px;
}

.linha-do-tempo-vertical .vlt-axis::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-1px);
    background: #d1d5db;
}

/* Marcador de ano sobre a linha */
.linha-do-tempo-vertical .vlt-year {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    min-width: 46px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid #2563eb;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
    white-space: nowrap;
}

.linha-do-tempo-vertical .vlt-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.linha-do-tempo-vertical .vlt-card a {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

.linha-do-tempo-vertical .vlt-card a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.linha-do-tempo-vertical .vlt-tags {
    margin-top: 0.35rem;
}

.linha-do-tempo-vertical .vlt-tag {
    display: inline-block;
    padding: 1px 8px;
    margin: 2px 4px 0 0;
    border-radius: 999px;
    font-size: 0.72rem;
}

.linha-do-tempo-vertical .vlt-tag-cat {
    background: #eff6ff;
    color: #1e40af;
}

.linha-do-tempo-vertical .vlt-tag-inst {
    background: #ecfdf5;
    color: #065f46;
}

/* Alinhamento alternado */
.linha-do-tempo-vertical .vlt-row.is-left .vlt-card {
    justify-self: end;
    text-align: right;
}

.linha-do-tempo-vertical .vlt-row.is-left .vlt-gap {
    grid-column: 3;
}

.linha-do-tempo-vertical .vlt-row.is-right .vlt-card {
    justify-self: start;
    text-align: left;
}

.linha-do-tempo-vertical .vlt-row.is-right .vlt-gap {
    grid-column: 1;
}

/* Responsivo: colapsa para uma coluna única com a linha à esquerda */
@media (max-width: 640px) {
    .linha-do-tempo-vertical .vlt-row {
        grid-template-columns: 46px 1fr;
    }

    .linha-do-tempo-vertical .vlt-axis {
        grid-column: 1;
    }

    .linha-do-tempo-vertical .vlt-gap {
        display: none;
    }

    .linha-do-tempo-vertical .vlt-card {
        grid-column: 2;
        justify-self: start !important;
        text-align: left !important;
    }
}

.linha-do-tempo-vertical .vlt-order-btn {
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 600;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.linha-do-tempo-vertical .vlt-order-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

/* ==========================================================================
   Linha do tempo GANTT (shortcode [linha_do_tempo_gantt])
   ========================================================================== */

.linha-do-tempo-gantt {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    font-family: inherit;
    color: #1f2937;
    overflow-x: auto;
}

.linha-do-tempo-gantt svg {
    display: block;
    width: 100%;
    height: auto;
    min-width: 700px;
}

/* Eixo X (anos) */
.linha-do-tempo-gantt .gt-axis text {
    font-size: 11px;
    fill: #6b7280;
}

.linha-do-tempo-gantt .gt-axis line,
.linha-do-tempo-gantt .gt-axis path {
    stroke: #d1d5db;
    stroke-width: 1;
}

/* Grades verticais */
.linha-do-tempo-gantt .gt-grid line {
    stroke: #e5e7eb;
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.linha-do-tempo-gantt .gt-grid path {
    display: none;
}

/* Barra Gantt (instituição) */
.linha-do-tempo-gantt .gt-bar {
    fill: #2563eb;
    fill-opacity: 0.18;
    stroke: #2563eb;
    stroke-width: 1.2;
    cursor: default;
    transition: fill-opacity 0.15s ease;
}

.linha-do-tempo-gantt .gt-bar:hover {
    fill-opacity: 0.30;
}

/* Rótulo da instituição (lado esquerdo) */
.linha-do-tempo-gantt .gt-inst-label {
    font-size: 12px;
    fill: #374151;
    font-weight: 500;
}

/* Marcadores (dots) dos itens */
.linha-do-tempo-gantt .gt-dot {
    fill: #ffffff;
    stroke: #2563eb;
    stroke-width: 2;
    cursor: pointer;
    transition: r 0.1s ease, fill 0.1s ease;
}

.linha-do-tempo-gantt .gt-dot:hover {
    fill: #2563eb;
    r: 8;
}

/* Legenda */
.linha-do-tempo-gantt .gt-legend-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.linha-do-tempo-gantt .gt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.linha-do-tempo-gantt .gt-legend-bar {
    display: inline-block;
    width: 28px;
    height: 12px;
    border-radius: 3px;
    background: rgba(37, 99, 235, 0.18);
    border: 1.2px solid #2563eb;
}

.linha-do-tempo-gantt .gt-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #2563eb;
}

/* Tooltip */
.linha-do-tempo-gantt .gt-tooltip {
    position: absolute;
    z-index: 30;
    display: none;
    max-width: 320px;
    padding: 0.9rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
    line-height: 1.45;
    pointer-events: none;
}

.linha-do-tempo-gantt .gt-tooltip.is-visible {
    display: block;
}

.linha-do-tempo-gantt .gt-tooltip-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.linha-do-tempo-gantt .gt-tooltip p {
    margin: 0 0 0.5rem;
}

.linha-do-tempo-gantt .gt-tooltip .gt-tooltip-kv {
    margin: 0.15rem 0;
}

.linha-do-tempo-gantt .gt-tooltip .gt-tooltip-kv strong {
    color: #374151;
}

.linha-do-tempo-gantt .gt-tooltip .gt-tooltip-tags {
    margin-top: 0.4rem;
}

.linha-do-tempo-gantt .gt-tooltip .gt-tag {
    display: inline-block;
    padding: 1px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
}

.linha-do-tempo-gantt .gt-tooltip a.gt-button {
    pointer-events: auto;
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.linha-do-tempo-gantt .gt-tooltip a.gt-button:hover {
    background: #1e40af;
}

/* Estado vazio */
.linha-do-tempo-gantt .gt-empty {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}

/* ==========================================================================
   Linha do tempo em BARRAS (shortcode [linha_do_tempo_barras])
   ========================================================================== */

.linha-do-tempo-barras {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    font-family: inherit;
    color: #1f2937;
}

.linha-do-tempo-barras svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Barra de ferramentas (título + controles de zoom) */
.linha-do-tempo-barras .lbt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.linha-do-tempo-barras .lbt-title {
    font-weight: 600;
    color: #374151;
}

.linha-do-tempo-barras .lbt-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.linha-do-tempo-barras .lbt-controls button {
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.82rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.linha-do-tempo-barras .lbt-controls button:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.linha-do-tempo-barras .lbt-controls button.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.linha-do-tempo-barras .lbt-controls button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    background: #f3f4f6;
    color: #9ca3af;
}

.linha-do-tempo-barras .lbt-hint {
    margin: 0 0 1rem;
    font-size: 0.78rem;
    color: #6b7280;
}

/* Eixo / grade */
.linha-do-tempo-barras .lbt-axis text {
    font-size: 11px;
    fill: #6b7280;
}

.linha-do-tempo-barras .lbt-axis line,
.linha-do-tempo-barras .lbt-axis path {
    stroke: #d1d5db;
    stroke-width: 1;
}

.linha-do-tempo-barras .lbt-grid line {
    stroke: #e5e7eb;
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.linha-do-tempo-barras .lbt-grid path {
    display: none;
}

/* Linha de base (importância 0) */
.linha-do-tempo-barras .lbt-baseline {
    stroke: #d1d5db;
    stroke-width: 1.5;
}

/* Rótulo do eixo de importância */
.linha-do-tempo-barras .lbt-axis-label {
    font-size: 11px;
    fill: #9ca3af;
}

/* Fios (strands) dos eventos */
.linha-do-tempo-barras .lbt-hair {
    fill: none;
    stroke-linecap: round;
    transition: filter 0.15s ease;
}

.linha-do-tempo-barras .lbt-hair-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 18;
    cursor: pointer;
}

.linha-do-tempo-barras .lbt-hair-wrap {
    pointer-events: none;
}

.linha-do-tempo-barras .lbt-hair-wrap path.lbt-hair-hit {
    pointer-events: auto;
}

.linha-do-tempo-barras .lbt-hair-dot {
    stroke: #ffffff;
    stroke-width: 1;
}

.linha-do-tempo-barras .lbt-zooming .lbt-hair,
.linha-do-tempo-barras .lbt-zooming .lbt-hair-dot {
    opacity: 0.4;
}

/* Brush — ferramenta de seleção de período para zoom.
   Por padrão o overlay é transparente a eventos (para não bloquear hover/click
   nas barras); só fica ativo quando o modo "Selecionar período" está ligado. */
.linha-do-tempo-barras .lbt-brush .overlay {
    fill: none;
    pointer-events: none;
}

.linha-do-tempo-barras.lbt-zooming .lbt-brush .overlay {
    pointer-events: all;
    cursor: crosshair;
}

.linha-do-tempo-barras .lbt-brush .selection {
    fill: #2563eb;
    fill-opacity: 0.14;
    stroke: #2563eb;
    stroke-width: 1.5;
}

.linha-do-tempo-barras .lbt-brush .handle {
    fill: #2563eb;
}

/* Aviso de região vazia */
.linha-do-tempo-barras .lbt-empty-note {
    font-size: 0.85rem;
    fill: #9ca3af;
}

/* Tooltip */
.linha-do-tempo-barras .lbt-tooltip {
    position: absolute;
    z-index: 30;
    display: none;
    max-width: 320px;
    padding: 0.9rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
    line-height: 1.45;
    pointer-events: none;
}

.linha-do-tempo-barras .lbt-tooltip.is-visible {
    display: block;
}

.linha-do-tempo-barras .lbt-tooltip-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.linha-do-tempo-barras .lbt-tooltip p {
    margin: 0 0 0.5rem;
}

.linha-do-tempo-barras .lbt-tooltip .lbt-tooltip-kv {
    margin: 0.15rem 0;
}

.linha-do-tempo-barras .lbt-tooltip .lbt-tooltip-kv strong {
    color: #374151;
}

.linha-do-tempo-barras .lbt-tooltip .lbt-tooltip-tags {
    margin-top: 0.4rem;
}

.linha-do-tempo-barras .lbt-tooltip .lbt-tag {
    display: inline-block;
    padding: 1px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
}

.linha-do-tempo-barras .lbt-tooltip a.lbt-button {
    pointer-events: auto;
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.linha-do-tempo-barras .lbt-tooltip a.lbt-button:hover {
    background: #1e40af;
}

/* Legenda */
.linha-do-tempo-barras .lbt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}

.linha-do-tempo-barras .lbt-legend .lbt-legend-label {
    flex-basis: 100%;
    margin-bottom: -0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.linha-do-tempo-barras .lbt-legend .lbt-legend-divider {
    flex-basis: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.linha-do-tempo-barras .lbt-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #374151;
}

.linha-do-tempo-barras .lbt-legend .lbt-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.linha-do-tempo-barras .lbt-legend .lbt-swatch-macro {
    height: 40px;
    background: #2563eb;
    border: 1.5px solid #1e3a8a;
    border-radius: 4px;
}

.linha-do-tempo-barras .lbt-legend .lbt-swatch-normal {
    height: 8px;
    background: #cbd5e1;
}

/* Estado vazio */
.linha-do-tempo-barras .lbt-empty {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}
