/* static/css/new-timeline.css */

/* Controles de filtro */
.timeline-filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f7;
}

.filter-btn {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e0;
}

.filter-btn.active {
    background-color: #4f46e5; /* Un azul más moderno */
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

/* Diseño de Tarjeta de Timeline REFINADO */
.timeline-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.07);
}

/* Icono a la izquierda */
.timeline-card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

/* Contenido principal (título y fecha) */
.timeline-card-content {
    flex-grow: 1;
    min-width: 0; /* Permite que el elipsis funcione dentro de flex */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    overflow: hidden;
}

.timeline-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-card-date {
    font-size: 13px;
    color: #8b99ad;
}

/* Días transcurridos a la derecha (REFINADO) */
.timeline-card-days {
    flex: 0 0 82px;
    text-align: right;
    margin-left: 4px;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.days-ago-number {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
}

.days-ago-text {
    font-size: 10px;
    color: #94a3b8;
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.days-ago-prefix {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    line-height: 1;
}

.days-ago-value {
    font-size: 22px;
    font-weight: 800;
    color: #0ea5e9; /* Azul vivo parecido a la referencia */
    line-height: 1;
}

/* Botón de eliminar en la tarjeta */
.timeline-delete-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.timeline-delete-btn:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

.timeline-delete-btn:active {
    transform: scale(0.95);
}

.timeline-delete-btn i {
    font-size: 14px;
}

/* Estilos para el estado vacío, por si se muestra */
.empty-timeline {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-timeline i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ============================================
   ESTILOS PARA COMENTARIOS EN TIMELINE
   ============================================ */

/* Tarjeta con comentario - estructura de dos filas */
.timeline-card.has-comment {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.timeline-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

/* Meta info (fecha y estado) */
.timeline-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.timeline-card-meta .timeline-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-card-meta .timeline-card-date i {
    font-size: 11px;
    opacity: 0.7;
}

.timeline-card-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sección de comentarios */
.timeline-card-comment {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    width: 100%;
}

.timeline-card-comment .comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: #667eea;
    font-size: 12px;
    font-weight: 600;
}

.timeline-card-comment .comment-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-card-comment .comment-header i {
    font-size: 14px;
}

.timeline-card-comment .comment-text {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    border-left: 3px solid #667eea;
    position: relative;
}

.timeline-card-comment .comment-toggle {
    background: transparent;
    border: none;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 4px;
}

.timeline-card-comment .comment-toggle:hover {
    text-decoration: underline;
}

.timeline-card-comment.is-collapsed .comment-text {
    max-height: 88px;
    overflow: hidden;
}

.timeline-card-comment.is-collapsed .comment-text::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    background: linear-gradient(180deg, rgba(248, 249, 255, 0) 0%, rgba(248, 249, 255, 1) 100%);
}

.timeline-card-comment .comment-text::before {
    content: '\201C';
    position: absolute;
    top: -5px;
    left: 8px;
    font-size: 28px;
    color: #667eea;
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* Responsive para comentarios */
@media (max-width: 480px) {
    .timeline-card-header {
        flex-wrap: wrap;
    }

    .timeline-card-days {
        width: 100%;
        flex: none;
        margin-top: 10px;
        text-align: left;
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
    }

    .days-ago-value {
        font-size: 18px;
    }

    .timeline-card-comment .comment-text {
        font-size: 13px;
        padding: 10px 12px;
    }
}
