/* Línea de tiempo en serpiente (cronograma público y planner).
   Usa las variables de color definidas en styles.css */
:root {
    --tl-line: #5C4B51;
    --tl-pink: #E9759F;
    --tl-row-height: 190px;
    --tl-dot-y: 74px;
}

.timeline {
    width: 100%;
    margin: 10px auto 0;
}

.tl-message {
    text-align: center;
    color: var(--texto-oscuro);
    font-style: italic;
}

.tl-row {
    display: flex;
    height: var(--tl-row-height);
}

.tl-row.is-reversed {
    flex-direction: row-reverse;
}

.tl-item {
    --cur: var(--tl-line);
    --prev: var(--tl-line);
    position: relative;
    flex: 0 0 calc(100% / var(--cols));
    max-width: calc(100% / var(--cols));
    padding: 0 6px;
    text-align: center;
}

.tl-item.is-highlight { --cur: var(--tl-pink); }
.tl-item.prev-highlight { --prev: var(--tl-pink); }

.tl-icon {
    height: 56px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 1.9em;
    color: var(--cur);
}

/* Tramo hacia el nodo anterior (::before, con degradado) y hacia el siguiente (::after) */
.tl-item::before,
.tl-item::after {
    content: '';
    position: absolute;
    top: var(--tl-dot-y);
    width: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
}

.tl-item::before {
    left: 0;
    background: linear-gradient(to right, var(--prev), var(--cur));
}

.tl-item::after {
    right: 0;
    background: var(--cur);
}

.tl-row.is-reversed .tl-item::before {
    left: auto;
    right: 0;
    background: linear-gradient(to left, var(--prev), var(--cur));
}

.tl-row.is-reversed .tl-item::after {
    right: auto;
    left: 0;
}

/* El primer nodo de cada fila no tiene tramo previo: lo dibuja la curva de la fila anterior */
.tl-item:not(.has-prev)::before { display: none; }

/* El último nodo de toda la línea no tiene tramo siguiente */
.tl-row:last-child .tl-item:last-child::after { display: none; }

/* Curva que une el último nodo de una fila con el primero de la siguiente */
.tl-item.has-curve::after {
    right: 0;
    width: 50%;
    height: calc(var(--tl-row-height) + 4px);
    margin-top: -2px;
    background: none;
    border: 4px solid var(--cur);
    border-left: 0;
    border-radius: 0 100% 100% 0 / 0 50% 50% 0;
    box-sizing: border-box;
}

.tl-row.is-reversed .tl-item.has-curve::after {
    right: auto;
    left: 0;
    border: 4px solid var(--cur);
    border-right: 0;
    border-radius: 100% 0 0 100% / 50% 0 0 50%;
}

.tl-dot {
    position: absolute;
    z-index: 2;
    top: var(--tl-dot-y);
    left: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--cur);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
}

.tl-time {
    margin-top: 26px;
    font-weight: 700;
    font-size: 1.15em;
    color: var(--texto-oscuro);
}

.tl-item.is-highlight .tl-time { color: var(--tl-pink); }

.tl-label {
    font-size: 0.92em;
    line-height: 1.3;
    color: var(--texto-oscuro);
}

.tl-notes {
    margin-top: 4px;
    font-size: 0.8em;
    font-style: italic;
    color: var(--dorado-suave);
}

@media (max-width: 600px) {
    :root { --tl-row-height: 200px; }
    .tl-icon { font-size: 1.6em; }
    .tl-time { font-size: 1.05em; }
    .tl-label { font-size: 0.85em; }
}

/* Página del planner */
.planner-date {
    font-family: 'RougeScript', cursive;
    font-size: 2.4em;
    color: var(--texto-oscuro);
    text-align: center;
    margin: -10px 0 20px;
}

.planner-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.planner-legend span::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--tl-line);
    vertical-align: middle;
}

.planner-legend span.legend-highlight::before { background: var(--tl-pink); }

.tl-svg {
    width: 1.3em;
    height: 1.3em;
    margin-bottom: -2px;
}

/* Tablas del planner (canciones, etc.) */
.pt-wrap {
    overflow-x: auto;
}

.pt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.pt-table th {
    padding: 10px 12px;
    text-align: left;
    color: #33595a;
    background: var(--verde-pastel);
}

.pt-table th:first-child { border-radius: 8px 0 0 8px; }
.pt-table th:last-child { border-radius: 0 8px 8px 0; }

.pt-table td {
    padding: 12px;
    vertical-align: top;
    color: var(--texto-oscuro);
    border-bottom: 1px solid var(--gris-claro);
}

.pt-table tbody tr:hover td {
    background: rgba(244, 166, 193, 0.08);
}

.pt-empty {
    color: var(--dorado-suave);
}

.pt-link {
    color: var(--tl-pink);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.pt-link:hover {
    text-decoration: underline;
}

/* Teléfono: cada fila se muestra como una tarjeta con sus encabezados */
@media (max-width: 600px) {
    .pt-table thead { display: none; }

    .pt-table,
    .pt-table tbody,
    .pt-table tr,
    .pt-table td {
        display: block;
        width: 100%;
    }

    .pt-table tr {
        margin-bottom: 14px;
        padding: 6px 12px;
        background: var(--gris-claro);
        border-radius: 10px;
        border-left: 4px solid var(--verde-pastel);
    }

    .pt-table td {
        padding: 6px 0;
        border-bottom: 0;
    }

    .pt-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75em;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: var(--dorado-suave);
    }
}

/* Secciones de mapas del planner: más anchas que el resto para que el plano se lea */
.planner-mapa {
    position: relative;
    left: 50%;
    width: min(96vw, 1840px);
    transform: translateX(-50%);
    padding: 40px 20px;
}

.planner-mapa .seating-map {
    margin: 0;
}

/* Etiqueta de la restricción alimentaria (mismos colores que en el mapa de la recepción) */
.pt-tag {
    display: inline-block;
    padding: 3px 12px;
    font-weight: 600;
    border-radius: 12px;
}

.pt-tag--vegetariana { background: var(--verde-pastel); color: #33595a; }
.pt-tag--alergia { background: #e88a8e; color: #5c1a1d; }
.pt-tag--pollo { background: #e8cba8; color: #6b4a2b; }

/* Checklist de la columna "Estado" (solo lectura: se marca desde la hoja con una X) */
.pt-check {
    font-size: 1.5em;
    color: var(--dorado-suave);
}

.pt-check--done {
    color: #6DBE98;
}
