/* assets/css/digital.css */

/* --- GRID DE RECUERDOS --- */
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Adaptable */
  gap: 15px;
  padding: 10px;
  padding-bottom: 80px; /* Espacio para que el botón flotante no tape contenido */
  max-height: 60vh; /* Para que tenga scroll interno si son muchos */
  overflow-y: auto;
}

/* --- TARJETA BASE --- */
.memory-card {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.memory-card:hover {
  transform: translateY(-3px);
}

/* Bordes de color según tipo */
.link-card {
  border-top: 4px solid #007bff;
}
.letter-card {
  border-top: 4px solid #d81b60;
  background: #fffdfd;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #888;
  font-size: 0.9rem;
}

.author-tag {
  font-size: 0.7rem;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: bold;
  color: #555;
}

.memory-card h3 {
  margin: 5px 0 10px 0;
  font-size: 1.1rem;
  color: #333;
  font-weight: bold;
}

/* Texto de la carta (Preview) */
.letter-preview {
  font-style: italic;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Botones de Acción */
.action-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
  border: none;
  font-weight: 600;
}

.link-btn {
  background: #e7f1ff;
  color: #007bff;
}
.letter-btn {
  background: #fce4ec;
  color: #d81b60;
}

/* Botón Flotante (+) */
.fab-btn {
  position: absolute;
  bottom: 45px;
  right: 20px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: #d81b60;
  color: white;
  font-size: 22px;
  border: none;
  box-shadow: 0 4px 12px rgba(216, 27, 96, 0.4);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.fab-btn:active {
  transform: scale(0.9);
}

/* BOTÓN ELIMINAR (NUEVO) */
.delete-mem-btn {
  background: none;
  border: none;
  color: #ccc; /* Gris claro inicial */
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.2s ease;
  margin-left: 10px; /* Separar del author-tag */
}

/* Hover: se vuelve rojo para indicar peligro */
.delete-mem-btn:hover {
  color: #d32f2f;
}

/* Estilo ajustado para el Header de la tarjeta */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Alineación vertical perfecta */
  margin-bottom: 10px;
}

/* Flex para agrupar icono y autor a la izquierda */
.card-header > div {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #888;
  font-size: 0.8rem;
}

.card-actions {
  display: flex;
  gap: 8px; /* Espacio entre el lápiz y la cruz */
}

.edit-mem-btn,
.delete-mem-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s;
}

.edit-mem-btn {
  color: #007bff;
} /* Azul para editar */
.delete-mem-btn {
  color: #dc3545;
} /* Rojo para borrar */

.edit-mem-btn:hover,
.delete-mem-btn:hover {
  transform: scale(1.2); /* Efecto zoom al pasar mouse */
}
